广场

Nudeps: bundler-like imports, none of the baggage

The goal is light-build, not no-build You npm install a package (e.g. vue ), you write import { createApp } from "vue" , and it works — as long as there is a bundler in between. Without one, the browser has no idea what "vue" is: it only understands URLs, and node_modules/ was never meant to be deployed. So even the simplest project ends up needing a bundler, only so it can use dependencies instead of reinventing the wheel. But bundlers add a significant tax. They process every single file, introduce several layers of abstraction between source and deployment, and these abstractions often leak : things that work fine in the browser can break in the build. Earlier this year, I published Web d…

Lea Verou开发技术英文

Candidate Statement for the 2026 W3C TAG Election

Group photo of the W3C TAG in July 2022 with me to the left of Sir Tim Berners-Lee (inventor of the Web and TAG chair emeritus). Photo credit: Dan Appelquist I had the great honor of being elected to the TAG by the W3C membership in 2020 and again in 2022 , serving two terms from 2021 to 2025. After a two-year break, this year I’m running to return, thanks to Google, Microsoft, and OpenJS Foundation pooling resources to make it possible. 💙 The W3C Technical Architecture Group (TAG) is the Working Group that ensures that Web Platform technologies are usable and follow consistent design principles, whether they are created inside or outside W3C. It advocates for the needs of everyone who uses …

Lea Verou开发技术英文

The best way to use icons in Web UIs

TL;DR? Jump to demo I’ve always had a soft spot for icons 1 . Not only do they add polish to a UI, they can also tangibly improve usability. Familiar icons help users find what they need quickly, since we recognize pictures much faster than we read words. And as a web architect at heart, the current dominant ways we have to include icons on the Web make me sad. While there are many, many different ways to include icons in a Web UI, each with different performance characteristics , by far the most common ones involve adding inline SVG to the HTML. For example, a trash icon might be included like this: <button> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" …

Lea Verou开发技术英文

The best dark mode toggle is probably none

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. But the article explicitly doesn’t answer the question “should you have one at all?” . I was much more neutral on this at the time of writing. I am now firmly in the “no” camp. More on that below. Th…

Lea Verou开发技术英文