3 ms·
We need a strict CSS that removes the cruft and promises improvements in performance. I don't know why the browsers haven't offered it yet. Like just remove flo
by philistine 2y ago
We need a strict CSS that removes the cruft and promises improvements in performance. I don't know why the browsers haven't offered it yet. Like just remove float.
- MrJohz 2y agoFloat is necessary for some layouts, particularly documents where you might have a lot of text that wraps around a handful of images. I don't believe it's possible to implement that without floats (at least not without some clever shenanigans). I think most attempts to simplify CSS are going to fail in this way. Almost all of CSS right now is useful for something or other — there's actually not a huge amount of cruft in there (in comparison to, say, JS, where a lot of built-in APIs and functions should not be used, or need to be used in the right way). It's just that CSS gets used for everything from applications (where grid/flex are mostly enough) through to documents (where floats and tables become more important).
- littlestymaar 2y agoYeah the problem with CSS comes from its weird design with many implicit rules (border collapse, block formatting context, and hundreds of other quirks), but not from the fact that it's “bloated”. So if you want to address CSS's problem, they must: - invent a more coherent and easy to use styling language - implement a GPU-accelerated renderer - write tons of documentation to make sure people will find how to use it No wonder why people stick with CSS for everything nowadays even if the consensus is that it's a really annoying tool to work with.
- philistine 2y agoMy point is that this language could be built on a foundation of CSS. Like don't implement the flow model, just implement box. Change how all the border collapses and block formatting work, but keep CSS as the language. I mean they should even change the order priority to make it fit with typical conventions.