6 ms·
I think most of the complaints against CSS is because don't understand the problems CSS is trying to solve. It is not just a question of putting text and colors
by goto11 6y ago
I think most of the complaints against CSS is because don't understand the problems CSS is trying to solve. It is not just a question of putting text and colors on a screen. You can do that with Postscript or PDF or SVG or several other comparatively simple technologies. CSS is trying to tackle a much harder problem:
- Layout and typography which can be readable on various devices with wildly different dimensions, aspect ratios and resolutions.
- Incrementally rendered (i.e. the start of the document can be rendered before the whole document has been loaded)
- Allow users to enlarge the text size while keeping the text legible. (In a PDF you can zoom, but then you will have to scroll vertically back and forth for each line.)
- Backwards compatible with the display model of pre-CSS presentational HTML
No other technology exist which solves all these problems. If you ignore one of more of the above constraints you can probably devise a simpler and more intuitive styling language.
- fk6aaa545c 6y agoMaybe that's exactly the problem with CSS that's it's trying to solve too many problems and then in the real world you end up with so many hacks you are happy you can put text and colors on screen the way you want.