Grid algorithm adventures
27 May 2026 | tagged as CSS
I explain a bit of grid theory, a simplified grid algorithm, and how the noble art of not giving too many instructions is best for creating robust layouts. Rambles slightly.
Posts with the CSS tag.
Blog homepage RSS feed Mastodon Bluesky About me
This blog uses a new RSS feed. Please update the old QuirksBlog feed you used to follow.
27 May 2026 | tagged as CSS
I explain a bit of grid theory, a simplified grid algorithm, and how the noble art of not giving too many instructions is best for creating robust layouts. Rambles slightly.
7 May 2026 | tagged as CSS
I created a technique to fill a grid column by column instead of row by row, while still setting a maximum number of columns. It works, but is brittle. Here we’ll discuss why it is brittle, and why a superior technique can't work without children-count().
5 May 2026 | tagged as CSS
I have a grid that I want to fill with items, not row by row, as usual, but column by column. At the same time, I want to set a maximum number of columns, and add rows as needed, as a regular row-by-row grid does. To do so I created the technique described here. It's not perfect.
16 April 2026 | tagged as CSS
Today, let’s demystify block formatting contexts by declaring them properly and by explaining them as 'getting an element ready to scroll'.
10 April 2026 | tagged as CSS Safari
This week I spent too much time on a Safari :has(:empty) bug. I wanted to know if my huge brain lobe dedicated to browser bugs is still in working order after years of disuse. It was, and I even found a workaround, but I won't do this very often.