3 ms·
> CSS works the way it does because it was created to make the kind of designs that designers wanted possible Well, not originally. Later that became a thing,
by int_19h 8y ago
> CSS works the way it does because it was created to make the kind of designs that designers wanted possible
Well, not originally. Later that became a thing, yes - but all the design that was already there at that point (circa CSS 2) remained, as did the overall approach with cascading styles.
A styling language designed for HTML5 today from scratch, accommodating modern use cases, would likely look a lot different.
- perilunar 8y agoIt would probably be written in JS, maybe something like JSSS [1]. I remember playing with it when it came out and thinking it was very cool. Pity it never went anywhere. If we were going to start from scratch though, we wouldn't do HTML5, we'd use some other format. JSON maybe? 1. https://en.wikipedia.org/wiki/JavaScript_Style_Sheets https://en.wikipedia.org/wiki/JavaScript_Style_Sheets
- jacobush 8y agoDisplay PostScript? Only kidding, maybe.
- mattmanser 8y agoExtremely doubtful, given that many of the modern ones have been written in XML (e.g. xaml, android) and iOS went old skool with a drag/drop GUI. No-one went pure code (because it's a massive PITA).
- e12e 8y ago^this I think the best illustration of this "fight" between CSS as a tool for styling "traditional" hypertekst documents, vs CSS as a tool for styling "web pages" is the fate of Adobe's CSS regions proposal - and Håkon Lie's opinion piece arguing against it: https://alistapart.com/blog/post/css-regions-considered-harmful https://alistapart.com/blog/post/css-regions-considered-harm... That was when "design" lost. But now with grid and transitions, there's a "new" CSS - one that is oriented around UX for "web apps". But apps evolved from documents, mind - not from windowing toolkits like smalltalk morphs or Java swing etc. Fwiw I really liked the idea of regions for laying out rich documents - like what you might want for epub. I must admit I'm not that concerned about "web apps" - everyone seems to end up doing their o we n abstraction anyway, and the CSS that "falls out" isn't really sane anyway.
- int_19h 8y agoI just wish we decoupled apps and sites, instead of forcing it all together in a large and incoherent design. This is especially painful now that it's spilling over into the desktop world because of all the Electron apps.