Re:CSS coding techniques
by Klathmon on Friday May 20, 2016 @06:42AM
(#11736809)
In the future, try using:
It gives you the specificity to override most things, and still leaves you the "nuclear option" of `!important` if you ever need it.
[ Parent
| on HN ]
I'd rather see !important instead of this. This rule would call for quite a lengthy comment explaining just what in the hell the repeated .flat rules are for, and what other rules it's attempting to pave over such that you know when you need to add a 5th .flat as a "fix'.
That seems frighteningly unclear. If you do need the "nuclear" option, why not have that be the case where you get into weird specificity hacks (flat.flat !important /hack/) and leave the common style clear in its intention (.flat !important)?