4 ms·
Just curious, if you could throw out CSS and start from scratch, what would you do? What's the alternative?
by pupppet 3y ago
Just curious, if you could throw out CSS and start from scratch, what would you do? What's the alternative?
- pavlov 3y agoThe fundamental problem with CSS is that it conflates element content styling, layout directives, and compositing configuration into an unholy mess. One way out is to rethink each of these separate problems individually. Element styling is typically about configuring attributes, while layout is more closely related with programming (even if it’s a non-Turing complete environment like constraints). There’s no reason why the same language should try to do both.
- giantrobot 3y agoYou could go back to JavaScript style sheets[0]. I'm joking please don't do this it's stupid. [0] https://en.m.wikipedia.org/wiki/JavaScript_Style_Sheets https://en.m.wikipedia.org/wiki/JavaScript_Style_Sheets
- TheOtherHobbes 3y agoHave a single common bytecode language for all web dev, including scripting, content definition, and UI. But not js. Support programmatic control of content generation, styling, composition, animation, UI events, backend connections, and object-based component reuse with standard libraries that implement each feature across multiple platforms. Basically the visual/UI part of iPhone/Android dev but in a browser, perhaps with some standard backend APIs. The amount of duplication in modern CRUD development is just insane. Every project reinvents the same wheels. CSS is part of that because it's so disconnected from the content and the UI that it has to be customised for each project and can't be reused - except as a reset file, which shouldn't even be needed.
- mmphosis 3y agoI have already thrown out Cascading StyleSheets. The alternative is HTML. If I could throw out HTML and start from scratch is a better question.
- goto11 3y agoHTML is not an alternative to CSS. The HTML still has to be presented in some way. HTML without any CSS just means it uses the default browser-supplied style sheet.
- lotsoweiners 3y agoMaybe he meant using HTML attributes like bgcolor etc.
- mmphosis 3y agoI mean throwing out HTML and HTML attributes altogether and starting from scratch. It's time to evolve out of PostScript, Portable Document Format (PDF), SGML, HyperText Markup Language (HTML) + CSS + JavaScript, markdown, and move to a fuller open document standard that brings all the amazing features of the old formats without all the baggage and mistakes. Just get rid of the crappy stuff and focus on the good stuff.