@terremotoBCN
Posted
Hi, Pablo,
Maybe nth-child()
is not the best way to consider which box is which color, it is more readable to use class names for this solution.
If you use BEM (Block - Element - Modifier) definition, maybe the solution is to concatenate the card color as modifier into your block element: user__card user__card--color
or maybe instead of defining it using colors, better use this, a hierarchical definition as you might need to change for new color themes: user__card user__card--primary
, user__card user__card--secondary
, user__card user__card--quotes
, etc.....
We will continue coding
Marked as helpful
@PaliTriesToDesign
Posted
@terremotoBCN Hey,
I will start using BEM from now on. Thanks for the help!