How would you write this CSS font color?

I’m trying to get into a pattern of working in the same logical way with least amount of CSS.

My CSS

With the pic below, what would be the best way to write the font color as the boxes have either light or dark font so I can’t just apply it to one class.

Cheers

1 Like

You haven’t shared your code, so we can’t give you specific advice.

If you have two colors you want to use, then you’ll want two classes and you’ll use the color property.

2 Likes

It was more of a general question but I’ve added a link.
each box has two classes of class=" Johndoe box"

I have a white and black font color. Of course I can just apply it to each .johndoe .mary etc but wondering if there’s a better way. (Want to avoid bad habits)

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.