I also wanted to negate issues surrounding specificity. To this ends, I adopted the widely used approach of insisting all selectors used a single (or as close to that ideal as possible) class-based selector.
If you're having CSS problems I feel bad for you son, I got 99 problems but specificity ain't one | ||
--https://twitter.com/benfrain/status/537339394706141184 |
Furthermore, structural HTML elements (with the exception of pseudo-elements) are NEVER referenced in the style sheets as type selectors. In addition ID selectors are completely avoided in ECSS. Not because ID selectors are bad per se, but because we need a level playing field of selector strength.
Changes to components are handled via simple overrides. However, the way they are handled from an authoring perspective makes them easy to manage and reason about.
Suppose you have an element that needs to be a different width if it is within a certain container - easy peasy, we don't need to be draconian in the...