首页›发现›编程›Lea Verou

Lea Verou

Atom运行正常
访问网站
文章数100
更新频率每月约 1.3 篇
最近抓取4分钟前
订阅方式Atom
订阅地址https://lea.verou.me/feed.xml

最近的文章

订阅后,这些文章和以后的新文章都会出现在你的阅读器里

Nudeps: bundler-like imports, none of the baggage

AI 摘要Nudeps is a lightweight build tool that lets developers keep using npm install and import dependencies by bare specifiers (like "vue") directly in the browser, without a bundler. It works by copying dependency files from node_modules into a deployable client_modules directory and generating an import map (using JSPM under the hood), touching only dependencies and never the developer's own code, so it requires no watcher and complements any other tooling. It supports many edge cases like dynamic imports, git dependencies, and CJS packages via a require() shim, but doesn't transform code (TypeScript/JSX still need their own tools), is npm-only for now, and may load many-small-module packages more slowly since it doesn't bundle.

Candidate Statement for the 2026 W3C TAG Election

AI 摘要In her candidate statement for the 2026 W3C TAG election, Lea Verou announces she is running to return to the TAG after serving two terms (2021–2025), with her participation this time fully funded by Google, Microsoft, and the OpenJS Foundation. She highlights her broad web platform experience and past TAG contributions, including the Web Platform Design Principles, API design reviews, and the Web Platform Gaps initiative. Her central platform is for the TAG to proactively shape the Web's architecture rather than just review it, including treating the rise of AI agents that write and consume web code as an architecture question guided by principles and evidence.

The best way to use icons in Web UIs

AI 摘要The article argues that the dominant ways of adding icons to web UIs—inline SVG markup and icon fonts—are clunky, boilerplate-heavy, or riddled with problems like large downloads and accessibility issues. The author proposes a pure CSS system where icons are design tokens defined as custom properties (e.g., --icon-trash) and rendered via pseudo-elements using CSS masks, so icons automatically follow text color, can be assigned per-component (e.g., a .delete button gets a trash icon by default), and can reactively change based on selectors, states, or media queries without touching markup. This approach keeps simple cases easy, complex overrides possible, and avoids usability cliffs, with the only remaining need for inline SVG being cases that require dynamically morphing the SVG itself.

The best dark mode toggle is probably none

AI 摘要In this follow-up to her earlier article, the author argues that the best dark mode toggle is no toggle at all, though if one is required, a two-state control alternating between system and the opposite theme beats a tri-state (system/light/dark) one. She rebuts Bramus's objections—such as the OS auto-switching edge case—contending that the failure scenario is rare and cheaply recoverable, that polls of developers measure preference rather than usability, and that tri-state controls add unnecessary cognitive load by exposing the implementation model instead of the user's actual goal. The piece also recounts the widespread positive reception of the original article and the alternative designs the ensuing debate inspired.

Dark mode toggles: two states are enough

AI 摘要The article argues that tri-state dark mode toggles (Light/Dark/System) leak the underlying data model into the UI and solve a largely imaginary user goal, since real users only seek out the toggle when something looks wrong. It advocates a well-designed two-state toggle that shows the currently resolved value and alternates between storing an explicit override and reverting to the system default, capable of expressing all three underlying states. Key implementation rules include only evaluating the stored override at user interaction, keeping it even if the OS preference later coincides with it, since any resulting confusion is rare and fixable with a single click.

In defense of polyfills

AI 摘要The article argues that polyfills are a net positive for the Web platform, responding to Anne van Kesteren's view at a WHATWG meeting that polyfilling is harmful because it restricts native API design flexibility. The author contends that the need for fallback code exists regardless of polyfills, and that polyfills are superior to ad-hoc alternatives because they are centrally maintainable and decouple standardized API design from implementation. Proposed alternatives—separate namespaces, dropping feature detection, and ponyfills—are dismissed as repeating the failed vendor prefix experiment or trading away real benefits like performance and accessibility for a largely theoretical risk.

External import maps, today!

AI 摘要The article explains that centralized import map management can be achieved today without external import map support by using a classic (blocking) script to dynamically inject an inline

Web dependencies are broken. Can we fix them?

AI 摘要The article argues that dependency management is an essential, ubiquitous need that the web platform has wrongly outsourced to third-party bundlers, unlike ecosystems like NodeJS, Python, or Rust where installing and importing packages is simple and first-class. Polls and State of JS data show that while nearly all developers use bundlers, a third to half wish they didn't, and current no-bundler approaches (such as vendoring node_modules or using CDN URLs) are fragile workarounds that break transitive dependencies and encapsulation. The author concludes that dependency management should be a built-in platform capability, decoupled from bundling, with specifiers serving as an essential abstraction over URLs.

In the economy of user effort, be a bargain

AI 摘要The article extends Alan Kay's maxim 'Simple things should be simple, complex things should be possible' beyond programming languages and APIs to all user interfaces, especially 'long-tail UIs' like creative tools where no clean 20-80 split of use cases exists. It introduces the complexity-to-effort curve and frames user effort as a currency, warning that 'usability cliffs'—where slight increases in task complexity cause disproportionate jumps in effort—leave users feeling ripped off. Using examples like Google Calendar, the HTML video element, Instagram's editor, and Coda, the author argues that designers should consciously smooth this curve by defining high-level abstractions in terms of low-level primitives so users can incrementally extend simple flows rather than start over.

State of HTML 2025 now open!

AI 摘要The State of HTML 2025 survey is now open, inviting web platform developers to share their experiences and pain points, with results directly influencing browser vendors' roadmaps and the Interop 2026 prioritization—especially responses submitted within the first two weeks (by end of July). This year's edition adds 35 new features and removes 18, pilots a new multiple-choice format for pain point questions in the Web Components section, and introduces browser support icons per feature. Responses are editable throughout the survey period, the survey is translated into dozens of languages, and even non-JavaScript developers are encouraged to participate since all questions are optional.

Influence the State of HTML 2025 Survey!

AI 摘要The author, who led the inaugural Google-funded State of HTML survey, is returning to lead the 2025 edition after stepping in at the last minute when the originally chosen leader was affected by the war in the Middle East. The article highlights how past surveys have driven real change in the web platform—such as influencing Interop 2024 and 2025 priorities and accelerating CSS Nesting's implementation after being flagged as a top developer pain point. With the survey launching later this month, the author invites the community to suggest upcoming HTML features and Web APIs that should be included, with a candidate list of 57 features needing heavy pruning.

The Hovercar Framework for Deliberate Product Design

AI 摘要The article introduces the 'Hovercar Framework' for deliberate product design, extending Henrik Kniberg's MVP skateboard metaphor into a six-stage progression—skateboard, scooter, bicycle, motorcycle, car, and hovercar—where the hovercar represents the 'North Star UI': an idealized product vision unconstrained by time, resources, or backwards compatibility. The core idea breaks tough product problems into three components: the ideal solution, the constraints preventing us from reaching it, and the compromises that get us reasonably close given those constraints. Benefits include making hard problems tractable, keeping the design process adaptable when constraints change, aligning teams by making implicit visions explicit (avoiding proxy arguments over effort), improving MVPs via early low-fidelity user testing, and paving the way for future evolution.

Bluesky Likes Web Components

AI 摘要The article describes the creation of two lightweight, dependency-free web components (`` and ``) that display Bluesky post likes and the users who liked them, inspired by a widget on Salma Alam-Naylor's site and made possible by Bluesky's refreshingly open API that requires no authentication or API key. The author frames this as a return to the open, mashup-friendly Web 2.0 era and outlines their API design principles: making common cases easy, complex cases possible, and avoiding usability cliffs. They also reflect on how building even simple web components involves far more work than expected, particularly around accessibility, i18n, and customization hooks, leading to their '99-99 rule' of web components.

Construction Lines

AI 摘要Writing on their 39th birthday and after parting ways with Font Awesome, the author reflects that endings are 'construction lines' rather than failures, and identifies autonomy, breadth, and impact—not income or work-life balance—as the strongest predictors of their happiness across 20 years in the industry. They announce plans to return to entrepreneurship and consulting, remain open to exceptional full-time roles that offer those three qualities, and are making their open source and writing work financially sustainable via Ko-fi and GitHub Sponsors.

Style-observer: JS to observe CSS property changes, for reals

AI 摘要The article announces style-observer, a new open-source JavaScript library (available at observe.style) that lets developers run JS in response to CSS property changes—including custom properties—regardless of what triggered them. It reviews the long history of prior attempts, from polling-based observers to clever transition-event hacks, culminating in Bramus Van Damme's @bramus/style-observer, which was hampered by cross-browser bugs. The new library improves browser support (~90% globally) by detecting specific browser bugs in Safari, Chrome, and Firefox and working around them in a targeted way, and ships with a test suite of over 150 unit tests.

Context Chips in Survey Design: “Okay, but how does it _feel_?”

AI 摘要The article chronicles the design journey behind 'context chips,' a survey UI innovation created for the State of HTML 2023 survey to solve the problem of collecting sentiment data alongside experience/awareness data with minimal user friction across 50+ feature questions. After several rejected alternatives (freeform comments, followups, sentiment radios), the author designed hover-revealed chips that let users express both experience and sentiment in a single click, a solution the team eventually implemented despite initial skepticism. The article also proposes 'mini-feature questions' combining checkboxes with context chips for older, lower-priority features to shorten the survey.

Web Components are not Framework Components — and That’s Okay

AI 摘要The author responds to recent criticism of Web Components by framework authors, arguing the controversy stems from conflating two distinct use cases: generalizable elements that extend HTML, where Web Components excel thanks to interoperability, and project-specific reactive templating, where frameworks remain superior due to better authoring ergonomics. While Web Components are still far from being a good compile target for frameworks, they don't need to be—their real value lies in reducing duplicated framework-specific reimplementations of common UI elements. The author concludes that frameworks and Web Components are complementary rather than competing, urging the community to stop pitting them against each other and to keep improving the platform's low-level foundations.

Making the Web more Awesome — for everyone

AI 摘要The author announces that after a decade at MIT and recently completing their PhD, they are starting a new role as Product Lead at Font Awesome, where they will improve product design and usability—with a focus on Web Awesome, an upcoming product that aims to revolutionize how web UIs are built using web components and CSS. They are drawn to the company's open-source-friendly, profitable, fully remote, and healthy work culture, noting that the role was practically molded around their skills, interests, and ADHD-driven need for passionate work. They also plan to write a series of upcoming blog posts about their journey, including leaving academia and writing their thesis with web technologies instead of LaTeX.

Forget “show, don’t tell”. Engage, don’t show!

AI 摘要Drawing on his daughter's piano lesson, the author argues that effective teaching requires minimizing upfront theory and instead connecting each concept to a clear purpose and immediate practice, since humans are goal-oriented and lose focus when learning feels disconnected from real application. He contends that explaining concepts in context, as they become relevant, yields far better retention and comprehension than front-loading theory, a principle that applies to all forms of knowledge transfer, from teaching and documentation to talks. His advice: always explain why something is useful, let students practice as soon as possible, and prefer engaging them over merely showing—hence "engage, don't show" rather than "show, don't tell."

Inline conditionals in CSS, now?

AI 摘要The article discusses the CSS Working Group's resolution to add an if() function to CSS, which is still years away, and surveys existing hacks that enable conditionals in CSS today, such as binary linear interpolation, space and cyclic toggles, layered toggles, and paused animations. The author argues that using such hacks in production can be justified under the 'Priority of Constituencies' principle—internal developer complexity is acceptable when it yields a cleaner API for component users—as long as the complexity is encapsulated and the code is well documented. However, these techniques are not advisable when the abstraction is likely to leak, in which case simpler approaches like attributes may be preferable.