Re:CSS Findings from the Threads App
by tannhaeuser on Sunday July 16, 2023 @10:02AM
(#36747100)
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.
[ Parent
| on HN ]
Re:CSS Findings from the Threads App
by brigadier132 on Sunday July 16, 2023 @12:14PM
(#36748585)
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.
Re:CSS Findings from the Threads App
by philistine on Sunday July 16, 2023 @02:55PM
(#36750291)
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.