Posts whose title or text contains one of these words are left out of every view.
Whole words only: ai catches "AI-generated" but not "openai". Add a star for word beginnings: llm* catches llm and llms.
99 words is the limit
https://lea.verou.me/blog
4 posts · 18 Votes · 1 Followers
Tech
Subscribe via RSS
About a month ago, I wrote an article recommending that if you are going to have an always visible control for switching between light and dark mode, it should be a two-state toggle that alternates between system and whatever the current opposite of system is, not a tri-state one (system, light, dark). If you are forced to include such a control (say, someone is pointing a gun at you and shouting “code dammit! now!”), I stand by that recommendation: use two states, as described in the article.…
A good two-state toggle can actually express all three data model states. Until recently, if you looked at most websites with a theme toggle[1], you’d find three options: Light, Dark, and System. Examples of tri-state dark mode toggles. In (LTR) reading direction: Ant Design, Red Hat Design System, Web Awesome, Excalidraw, Taiga, Astro, Hero UI.
If you’re a web developer, you may find the title baffling. “Polyfills need defending? Who’s against them?!” you might ask. Two weeks ago, I’d be in the same boat. Polyfills and I go way back. I dug up a JSConf EU talk of mine from 2011 on exactly this topic. Trying not to think about how young I look here 😅 One of the few opinions I have held strongly over the years is that polyfills are a net positive for the Web, and the good outweighs the rare failure cases where polyfills became too…