←back to thread

Web Browser Engineering (2021)

(browser.engineering)
679 points MrVandemar | 7 comments | | HN request time: 1.009s | source | bottom
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. fouric ◴[] No.41849657[source]
Layout is so difficult that it made me quit using Common Lisp and ncurses to build my passion project and become the very thing I swore to destroy (a React developer).

I can't be the only one who wants a simpler layout language than CSS that's designed with two decades of hindsight to provide the maximum simplicity-expressiveness product. Are there any serious projects to engineer something like this, or has everyone given up and either embraced CSS3 (waiting for the LLVM backend) or gone back to plain text?

replies(4): >>41850100 #>>41850251 #>>41850879 #>>41854329 #
2. syndeo ◴[] No.41850100[source]
LLVM backend for CSS3? (This must a joke, right??)
replies(1): >>41853007 #
3. meindnoch ◴[] No.41850251[source]
Constraint-based layouts. The world's most sophisticated UI system uses that (Apple's UIKit).
replies(1): >>41853657 #
4. pavpanchekha ◴[] No.41850879[source]
Author here, and I also teach web dev, including CSS, at the University of Utah (including this semester). Newer parts of CSS, like flex-box layout are both simple and powerful. Just use those! I think it's important to start thinking about learning all of the Web Platform like you'd think about learning all of the Windows APIs or all of the Linux system calls or all of your favorite programming language's features. People rarely do! (I have 15 years of Python experience, and I do not understand metaclasses or async.) There are lots of weird obscure corners, but you don't need to know those to build websites.
5. intelVISA ◴[] No.41853007[source]
;)
6. amelius ◴[] No.41853657[source]
I was playing with Solvespace a few weeks ago, and the thought occurred to me that the constraint-based modeling approach is exactly what I want in a layout system, and it extends to 3d even. We're stuck with CSS for now, but this must be the future.
7. niutech ◴[] No.41854329[source]
Check out laying out in Flutter: https://docs.flutter.dev/get-started/fundamentals/layout or Pax: https://docs.pax.dev/reference/layout/