I feel the same way, and I first wrote CSS in 1998 when it was so new that Netscape misinterpreted even the font size property.
There are now thousands of properties and their values, and browser engines have gone to heroic lengths to produce mostly consistent results from these often conflicting directives. But I still keep looking up basic things because the API is simultaneously sprawling and inexpressive and context-sensitive.
IMO, the core sin of CSS is mixing up three separate concerns: element styling, layout, and compositing. It’s mostly ok for the first. It’s insanely confusing for the second. And it mostly tries to pretend it’s not about the third at all, which leads to weird situations around implicit compositing groups.
We ended up here because CSS started as basically a copy of a handful of Microsoft Word dialog boxes (hence “float” etc.) And as soon as we had got the word processing use case barely working, everybody decided they wanted to build dynamic applications with this same engine instead.
The core sin 0 of CSS is introducing another item-value syntax to the stack when there are regular markup attributes for that exact purpose already. Then it gets worse by taking this simplistic syntactic device ad absurdum, only to then finally also start introducing expressions (calc(), custom properties, media queries). Really, CSS should've been sealed a long time ago, with a low-level API a la Houdini available for programmatic layout from JS rather than bloating the language to become accidental Turing, when these highly dynamic styling features are useful for JS apps anyway. Anyway, considering its complete lack of mental discipline and basic CompSci, the CSS WG at W3C has no business designing languages IMNSHO.
I completely disagree. If CSS were "sealed" it would be absolutely terrible and we'd still be dealing with floats and absolutely positioned elements. The problem with CSS is the weird implicit behavior and edge cases that remain due to compatibility.
Computed properties, custom properties and media queries are well designed.
What CSS needs is a refactor. Make a much smaller Strict-CSS that uses the same code paths in browsers, but provides far less options to the user, sticking to modern tools (grid, flex) with simplified naming schemes, while deprecating old ways of doing (float). That would finally allow a manageable mental model.
There are now thousands of properties and their values, and browser engines have gone to heroic lengths to produce mostly consistent results from these often conflicting directives. But I still keep looking up basic things because the API is simultaneously sprawling and inexpressive and context-sensitive.
IMO, the core sin of CSS is mixing up three separate concerns: element styling, layout, and compositing. It’s mostly ok for the first. It’s insanely confusing for the second. And it mostly tries to pretend it’s not about the third at all, which leads to weird situations around implicit compositing groups.
We ended up here because CSS started as basically a copy of a handful of Microsoft Word dialog boxes (hence “float” etc.) And as soon as we had got the word processing use case barely working, everybody decided they wanted to build dynamic applications with this same engine instead.