3 ms·
The problem is so hard because it's not decomposed in a right way. It would be much simpler if there were 1) a pure drawing language like PostScript, very well
by Mikhail_Edoshin 10y ago
The problem is so hard because it's not decomposed in a right way. It would be much simpler if there were 1) a pure drawing language like PostScript, very well researched and developed, 2) content, described purely in its own terms, and 3) a way to transform that content so it can be rendered by (1) on screen. This was the idea behind XML+XSLT, as far as I perceive it. CSS is kind of similar to XSLT in its pattern matching capabilities, but is both more complicated and way less powerful.
To compare things: Knuth's TeX has very few basic primitives: boxes, lists, and glue. And it produces very sophisticated layouts. CSS has a wagon of stuff and still cannot produce very basic things. I sometimes remember the old Ventura Publisher software (in 1990 I worked with version 3 of it). It was somewhat similar to the current HTML+CSS: you could have the same source text, but separate style files that would render it very differently for different purposes. 27 years ago.