←back to thread

Web Browser Engineering (2021)

(browser.engineering)
679 points MrVandemar | 5 comments | | HN request time: 0.001s | source
Show context
mannyv ◴[] No.41848587[source]
One great thing about this book is the 'stuff I didn't do' part.

Layout is really hard. Just tables by themselves are hard, even without any css around them. CSS makes layout impossibly difficult. I challenge anyone to keep the whole CSS spec and its associated behaviors in their head.

At this point css + html + javascript have become a dynamic PDL, and probably is one of the most complex pieces of software today.

As an aside, video decoding is offloaded onto hardware, so it's not as battery intensive as it used to be.

replies(11): >>41848643 #>>41848664 #>>41848729 #>>41848784 #>>41848785 #>>41849444 #>>41849487 #>>41849657 #>>41851786 #>>41852399 #>>41854447 #
1. vbezhenar ◴[] No.41848784[source]
This Babylonian tower will crumble one day.

Layout does not have to be so complex. There are dozens of GUI frameworks with simpler layout system. Those are enough for applications everyone uses.

replies(5): >>41849894 #>>41850107 #>>41851738 #>>41853975 #>>41855400 #
2. PaulDavisThe1st ◴[] No.41849894[source]
Actually, almost every GUI toolkit's scheme for layout has issues, and none of them are perfect.

The ones that use absolute pixel positioning fail when using different resolution displays.

The ones that use box packing fail when you need to deal with different sized displays.

The ones that use constraint programming fail when you need to layout hundreds or thousands of widgets.

CSS-style layout has its own pros and cons, but there is no alternative to it that is clearly better under all circumstances. If you doing layout and want to be resolution-independent, function on everything from phones to giant displays and have thousands of things to layout, CSS is actually likely better than any alternative.

3. maxwell ◴[] No.41850107[source]
Which do you recommend?
4. msie ◴[] No.41851738[source]
Pixel positioning is so nice! I remember how easy it was to layout UIs with VB.
5. mardifoufs ◴[] No.41853975[source]
And they all have massive issues, or just provide a worse version of CSS (QT's qss, for example, as it's just a less well documented, non standard and very sparsely talked about CSS implementation. Oh and it doesn't work for everything in QT)