The Incredible Overcomplexity of the Shadcn Radio Button
Well, this is horrifying.
And by LLMS I mean: (L)ots of (L)ittle ht(M)l page(S).
I really like this approach: using separate pages instead of in-page interactions. I remember Simon talking about how great this works, and that was a few years back, before we had view transitions.
I build separate, small HTML pages for each “interaction” I want, then I let CSS transitions take over and I get something that feels better than its JS counterpart for way less work.
Well, this is horrifying.
Every millisecond you spend executing JavaScript is a millisecond the browser can’t spend responding to a click, updating a scroll position, or acknowledging that the user did just try to type something. When your code runs long, you’re not causing “jank” in some abstract technical sense; you’re ignoring someone who’s trying to talk to you.
This is a great way to think about client-side JavaScript!
Also:
Before your application code runs a single line, your framework has already spent some of the user’s main thread budget on initialization, hydration, and virtual DOM reconciliation.
The core idea of the event is to get you up to speed on the most powerful web platform features that you can use right now. I love that because it aligns perfectly with what I’ve been working on over the last couple of years: finding ways to break old habits to get the most out of CSS.
This is a spot-on analysis of how CSS-in-JS failed to deliver on any of its promises:
CSS-in-JS was born out of good intentions — modularity, predictability and componentization. But what we got was complexity disguised as progress.
Another clever use of clamp() and calc() for web typography, but this time it’s adjusting letter-spacing.
Here’s an HTML web component you can use if you’re participating in the origin trial for the Web Install API.
The line-up is now complete and you don’t want to miss this!
Web browsers provide you with great features for free. Why would you choose to use tools that stop you taking advantage of that?
Reminding myself just how much you can do with CSS these days.
How to make the distance of link underlines proportional to the line height of the text.