5 ms·
I wonder if it would be possible to distill the "rendering essence" of HTML+CSS, i.e. have a pre-processor that transforms a lot of redundancies / complexities
by dukoid 6y ago
I wonder if it would be possible to distill the "rendering essence" of HTML+CSS, i.e. have a pre-processor that transforms a lot of redundancies / complexities out to just a hierarchy of spans+divs with style attributes.
For a modern browser, the two hierarchies would need to be dynamically linked, but specifying the "view hierarchy" in terms of a (very limited) HTML/CSS subset should yield the advantage that the correctness of the transformation step could still be inspected with a browser?
- goto11 6y agoThis was the idea behind XSL (and DSSSL before that). You transform semantic markup into a pure presentation format. By moving the transformation to the server you can have all the complexity of selectors, rules, inheritance, cascade etc resolved on the server and have the browser just receive low-level rendering instructions. Of course you can't have any form of dynamic HTML and accessibility would go out the windows.
- dukoid 6y agoI think there the presentation format typically would be a different language (such as xsl-fo)... I am suggesting a transformation to a subset of HTML+CSS