Good copy.
When you're nesting classes like this: .card{ .... .card__qr-code{...} }
it will transpile to this: .card{...} .card .card__qr-code {...} => higher specificity (20)
Use "&" for BEM elements when using SASS. .card{ &__qr-code{...} => concatenation = (".card" + "__qr-code") }
It will transpile to this: .card {...} .card__qr-code{...} => lower specificity (10)
Marked as helpful
@Rhinozer0s
Posted
Yess @AlexanderTheWise,
i already saw this but never implemented. Do you have some sources for me to read about?
@Rhinozer0s
Of course:
https://web.dev/learn/css/specificity/ https://css-tricks.com/the-sass-ampersand/