3 ms·
On top of the strangeness of collapsing distinction between loading up markup with single-use classes and single-use style rules.... in the era of CSS mixins, i
by wwweston 6y ago
On top of the strangeness of collapsing distinction between loading up markup with single-use classes and single-use style rules.... in the era of CSS mixins, it seems like it'd be easier than ever to come up with one or two class names that encapsulate the key document semantics (either semantics for presentational abstractions, or data semantics), and then if you really need a quiver full of fine-grained presentation-detail bundles, mix them in.
But instead it's really common to do what you've pointed out: something that's effectively inline styles in spirit.
The benefits of the semantic approach in terms of flexibility and abstraction seems really high. The only downside I can see is a bit of one common complaint about OOP, "everything happens somewhere else," requiring a context switch to figure out how markup is being told to present. But that seems like a problem better dealt with via tooling.