axr / specification

This is where we work on the specification for AXR
spec.axrproject.org
13 stars 0 forks source link

element::flag should have a higher specificity than element when flag has been activated #111

Closed Mouvedia closed 10 years ago

Mouvedia commented 11 years ago

Placeholder

vprimachenko commented 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