4 ms·
On the other hand, using ever-increasing specificity to emulate !important is about as elegant and semantic as using the hypothetical properties !importanter, !
by thrwy_ywrht 5y ago
On the other hand, using ever-increasing specificity to emulate !important is about as elegant and semantic as using the hypothetical properties !importanter, !importanterer and !importantererer
- calibas 5y agoEver-increasing specificity is how CSS works, to call that "emulating !important" is misleading. I'm suggesting using CSS as intended, the cascading part of cascading style sheets, instead of relying on a troublesome override. Edit: Take this example: div {font-size: 60% !important;} If I can't control the order the CSS is loaded, and I can't change that line directly, how do I modify it? Like this: html div {font-size: 70% !important;} The use of !important isn't some simple way of bypassing ever-increasing specificity. In many cases it just makes things more complex.