top | item 40985451

(no title)

emmacharp | 1 year ago

For the curious, here is a set of "simple" rules for CSS authoring that, coupled with linting (through Stylelint, for instance) can address a lot (most?) of the issues raised in the article and the comments:

https://ecss.info/en/

Interested in what you may think about these rules and the principles behind them.

PS: still a work in progress!

discuss

order

url00|1 year ago

This is impressive and an easy read, well done. Regardless, the fact that so many rules are needed to write good, safe, efficient CSS indicates to me at least a disconnect with the technology and how people want to use it. Indeed, just a casual look around the world of CSS tooling reinforces my opinion. CSS has such an odd mix of declarative-feeling design but with occasional "hacks" to get some imperative-like behaviors that more than once in my career I've thrown in the towel and just reached for a bit of JS to get the result I needed.

Sorry a bit rant-y.

emmacharp|1 year ago

CSS was not meant to be used by programmers but by designers... so yeah there's a disconnect there. But that does not mean programmers cannot use it the way it was intended to instead of making it, at great cost, like what they would have wanted it to be from the beginning!

Also, wouldn't you say that there are also many rules and guiding principles necessary to write good javascript? Genuinely curious here.