Understanding CSS selector priority / specificity
I’ll just toss in a link to the CSS 2.1 spec itself, and how browsers are supposed to calculate specificity: CSS 2.1 Section 6.4.3: A selector’s specificity is calculated as follows: count 1 if the declaration is from is a ‘style’ attribute rather than a rule with a selector, 0 otherwise (= a) (In HTML, … Read more