← Back to context

Comment by fouronnes3

5 days ago

Does having experience implementing a web browser engine feature change the way you write HTML or CSS in any way? Do you still google "css grid cheatsheet" three times a week like the rest of us?

> Does having experience implementing a web browser engine feature change the way you write HTML or CSS in any way?

I think I'm more concious of what's performant in CSS. In particular, both Flexbox and CSS Grid like to remeasure things a lot by default, but this can be disabled with a couple of tricks:

- For Flexbox, always set `flex-basis: 0` and `min-width: 0`/`min-height: 0` if you can without affecting the layout. This allows the algorithm to skip measuring the "intrisic" (content-based) size.

- For CSS Grid, the analogous trick is to use `minmax(0, 1fr)` rather than just `1fr`.

(I also have a proposal for a new unit that would make it easier to get this performance by default, but I haven't managed to get any traction from the standards people or mainstream browsers yet - probably I need to implement it and write it up first).

> Do you still google "css grid cheatsheet" three times a week like the rest of us?

Actually no. The process of reading the spec umpteen times because your implementation still doesn't pass the tests after the first N times really ingrains the precise meanings of the properties into your brain

  • How do you propose standards to the web groups?

    I want to propose CSS-inheritance—by-name (#box {inherit:$(#menu)})

    and the reintroduction of marquee tags for horizontal scrolling (a frequently used UI pattern on shopping sites).

To me, this is like asking if having built a sql engine if you write SQL differently.

I think the answer is yes. Having a strong understanding of the underlying engine helps you debug and optimize more quickly

Needing reference stuff never changes unless it’s so frequently used.