4 ms·
> It's essentially just a delivery vehicle to get low-level presentation instructions to the browser. Nothing about HTML is low-level. HTML (and most of web
by dmitriid 5y ago
> It's essentially just a delivery vehicle to get low-level presentation instructions to the browser.
Nothing about HTML is low-level.
HTML (and most of web tech) suffers from being both not low-level enough and not being high-level enough.
You can't override the browser and provide your own rendering pipeline if you wanted to actually do your UI [1] You can't tell it to batch rendering/update instructions for a subset of elements on the page. You can't compose elements. You can't use existing building blocks to combine them and build a proper new element [2] You look at a web-page funny, and it does a layout re-calculation [3]. And that layout recalc? It's abysmally slow. That's why you can't even animate anything useful. And so on and so forth.
[1] It's now possible wit Canvas and WebGL, but this is not web tech, not really. It's desktop tech that has been around for ages, and is now being bolted on to browsers.
[2] No, not really. Try and make a full dropdown/combo box that is properly customizable, keyboard-accessible, etc. Many have tried, all are abominations.
[3] Even things like border widths and some times even border colors wil cause a layout recalc: https://csstriggers.com https://csstriggers.com
- notpachet 5y agoI meant low level in terms of the semantic meaning that HTML can convey. The examples you gave of places where browsers are high-level in terms of what pixels get put where? I see those as features, not bugs. I'm actually happy that web browsers historically haven't given pages a lot of control over low-level rendering, and I am distressed by the ongoing push by large corporations to increase how much of that control they have access to. I agree with your point about not being able to compose higher-order elements, though.