News for hackers. Stuff that matters.
Re:Everything that uses configuration files should report wh... by masklinn on Sunday June 25, 2023 @07:36AM (#36467155)
Nesting is not actually more specific.

Rather specificity is a triple of (ids sub-selectors, class sub-selectors, element sub-selectors). When attributes conflict, the one whose rule has the more specific selector wins.

The specificities of the rules you wrote out are (1,0,0), (0,1,0), (0,2,0), (0,1,0), (0,1,0), and (0,0,1).

In-line attributes (@style) beat out out-out-of line ones except if they’re !important. Specificity also disambiguates between !important attributes.

Re:Everything that uses configuration files should report wh... by blowski on Sunday June 25, 2023 @07:57AM (#36467282)
Thank you for the clarification, I hadn't realised that.