Closed Mouvedia closed 10 years ago
as veo explained his idea there is no such a thing as selector specifity
in HSS. Rules coming lower in the document have more weight, and while this might be confusing at first there are advantages as the developer don't need to remember complicated specificity calculation rules (who does anyway) and is able to achieve more complicated behaviours than css. By sorting the CSS document by specificity one obtain an HSS-ish stylesheet and to make exception from this CSS provides only one tool - the !important
. We do already write the code that way
a {color:blue;}
a:hover {color:blueer;}
should you ever been in Brians position (i was) you had only one chance: reorder your rules in the stylesheet - there are no !priority 50
which would solve this problem.
In HSS this problem and occult solution would never arise as "should override other - move lower in code" is THE rule of thumb
Placeholder