Re: [csswg-drafts] [selectors] Functional pseudo-class like :matches() with 0 specificity

> What about something that just turns off specificity at the stylesheet level, and for those stylesheets everything is order based? This would allow authors to easily control when they wanted specificity to work as an override and when they wanted to ignored it and treat it purely as a query.

While something like this could be useful in some cases (as you mention, resets is a prime candidate), I'm not sure it should be the only way to override the specificity heuristic. Specificity can be a useful concept, it's just that the inferred specificity is often wrong. 

Also, you don't want *any* author rule to be able to override *any* rule in the third-party stylesheet. E.g. your library may have a `.button` component, you don't want their `div` or even `*` rule to override that, otherwise it becomes impossible to style anything.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1170#issuecomment-329879780 using your GitHub account

Received on Friday, 15 September 2017 19:37:56 UTC