Jacob Berglund

@jacobberglund.com

Frontend consultant @ variant.no. I like making simple and delightful things for the web. I'm a "lets solve it with HTTP, HTML, CSS, JS"-person. In that specific order.

🔥 New blog post: Dark mode toggles that expose three states (system, light, dark) seem like the best option. Until you think about user goals, that is. Before rushing to disagree, hear me out. lea.verou.me/blog/2026/da... PS: As a data point, @jakearchibald.com was converted after reading this 😅

Dark mode toggles: two states are enough • Lea Verou

Yes, the underlying model must have three states, but one is always irrelevant to the actual user goal. Users do not seek out solutions to problems they don’t currently have. A lot of the hate towards...

lea.verou.me

How do you do ”default” link styling without interfering if there’s other classes being added to it? Like it looking like a button for example :not([class]) is too much smartness.

Sorry if I’m late to the party, but it occurred to me that cascade layers can be used to show the most important CSS at the top. Like a button with variants. I want the variants up top and not the base. Without cascade layers this requires smartness™. Nice.

What is a combobox if not a popover, a text input to filter checkboxes/radios? Move the input, add in some arrow navigation and a programmatic click() and you got yourself a A+ LightDOM web component. The progressive enhancement is that it’s just a popover with some radios/checkboxes.

over a year ago, i gave a talk at the xoxo conference about a mural, a mcdonald’s, and a man. (but it was also secretly about life, and legacy, and meaning.) finally, i’m blogging the full story, with behind-the-scenes details, and a video of the talk. enjoy. cabel.com/wes-cook-and...

Wes Cook and the Centralia McDonald's Mural

A personal story about discovering a mural in a McDonald's, an unknown artist named Wes Cook, saving the mural, and a conference talk about the whole thing.

cabel.com

The light dismiss on popover is a game changer. Stacked drawers nested inside each just works as expected. Like…wat? Since when do I not need to bend the arcane arts of the DOM to my liking? Positively delightful.

As browsers have been getting prrrretty good at removing the need for JS with things like popover, view transitions and so on, I do believe the time for simpler stacks is upon us. Experimenting with hono to just HTML and, dare I say, it is quite delightful. 2026: progressive enhancement is back!

Hi new web dev followers! Here's the best tweet I've managed in 12 years, just so you know where the ceiling is on this account

A comic. First panel: someone labeled "Designer" passes a note labeled "SVG" to a person labeled "Developer".

Second panel: Developer opens the note to find a long unreadable string starting with "data:image/png"

Been doing a lot of color stuff lately and this is the result 🤓 Apart from the bezier curve to set some custom properties it is pretty much just CSS. OKLCH and relative colors doing the heavy lifting. 🦭