Repository navigation
v4.0.0
[4.0.0] – 2026-04-20
Why This Is A Major Release
browserux.css started as a single-file CSS foundation. With 4.0.0, it becomes a more structured product: modular public bundles, an explicit build pipeline, stronger contribution guidance, and the start of an automated multi-browser validation workflow.
The historical root entry is still preserved for compatibility, but the package surface, release workflow, and maintenance model are now materially broader than in 3.x. This version signals that architectural shift clearly and marks the transition from "one CSS file" to "a maintained CSS foundation with modular distribution and validation tooling".
Foundation And Behavior Changes
-
Focus fallback strategy
Replaced the global:focus { outline: none; }reset with a safer progressive-enhancement pattern::focusnow provides a visible fallback outline,:focus:not(:focus-visible)removes it after mouse interaction in supporting browsers, and:focus-visiblekeeps the branded keyboard focus ring. This preserves visible focus in browsers that do not support:focus-visiblewhile keeping the intended UX in modern browsers. -
[hidden]compatibility withhidden="until-found"
Refined the defensive hidden rule from a blanket[hidden] { display: none !important; }to[hidden]:where(:not([hidden="until-found"])) { display: none !important; }. This keeps the classic hidden state protected against accidental overrides while preserving the browser's native "hidden until found" behavior for in-page search and fragment navigation. -
Removed global
overscroll-behavior: containfromhtml
overscroll-behaviorremains a useful technique for preventing scroll chaining, but applying it at the page level also changes native browser behaviors such as pull-to-refresh and gesture navigation in some environments. The rule has been removed from the global foundation and is now better understood as a targeted component-level technique.
Distribution And Tooling
-
Modular distribution architecture
Introduced internalsrc/modules/andsrc/entries/layers plus new public bundles indist/(core.css,a11y.css,browser-ui.css,browserux.layer.css). The historical rootbrowserux.cssfile remains the primary public entry point so existing users can keep importing the package exactly as before while advanced users gain finer control. -
Build pipeline for modular releases
Addednpm run buildto regenerate the public bundles indist/fromsrc/entries/and keep the rootbrowserux.cssfile synchronized with the generated full bundle. -
Playwright validation skeleton
Added a Playwright foundation with Chromium, Firefox, and WebKit projects, demo helpers, smoke tests, and npm scripts for future automated browser validation. -
First real automated scenario
Added the first high-priority Playwright scenario forfocus-visible, validating pointer vs keyboard focus behavior on the demo across Chromium, Firefox, and WebKit. -
Additional real automated scenarios
Added four more high-priority Playwright scenarios for:user-valid/:user-invalid,@starting-styleondialog,scrollbar-gutter: stable, andcolor-scheme: light dark. These tests now validate the corresponding demo contracts across Chromium, Firefox, and WebKit using DOM and computed-style assertions that match each engine's observable behavior.
Experimentation And Research
- CSS lab workspace (
lab/browserux.lab.css)
Introduced an internal lab sheet to track promising CSS features that align with the BrowserUX philosophy but are not yet mature enough to ship in the foundation. Each entry documents what the feature does, its current status (watching,trial,ready-soon,migrated,rejected), why it matters for BrowserUX, and the conditions under which it can migrate intobrowserux.css. The lab file is never distributed via npm or the CDN and stays a working document, with a dedicatedlab/README.mddescribing the workflow.
Documentation And Developer Experience
- Updated the focus documentation to explain the new fallback strategy and why it is safer for a published CSS foundation.
- Expanded the
[hidden]reference to explain whyhidden="until-found"must be excluded from the defensive reset, in line with the project's learning-oriented role. - Updated the default styles reference to explain why
overscroll-behavioris no longer applied globally and when it should be used intentionally instead. - Added documentation for the new modular bundle architecture, public import paths, and bundle responsibilities.
- Added a dedicated guide for integrating
browserux.layer.csswith CSS Cascade Layers. - Reworked the browser support guide to separate baseline support, progressive enhancements, and limited-support features for a clearer compatibility story.
- Replaced floating GitHub CDN examples with version-pinned npm CDN URLs in the documentation to make installs more reproducible.
- Expanded the comparison guide to include
sanitize.css, classless frameworks such as Pico CSS and Water.css, and complementary tools such as Open Props. - Added a short decision guide to help users choose between
browserux.css, other CSS foundations, and the BrowserUX public bundles. - Added stack-specific integration recipes for plain HTML, Vite, React, Vue, Astro, and Next.js.
- Clarified the distinction between the neutral foundation layers and the more opinionated BrowserUX layer across the modular bundle documentation.
- Structured contribution guidance with a root
CONTRIBUTING.md, a clearer contribution workflow, and GitHub issue and pull request templates. - Added a demo validation matrix to map BrowserUX features to stable demo targets, verification styles, and automation priorities.
- Added a Playwright setup guide covering dependency installation, browser installation, base URL usage, and the initial local validation workflow.
- Reworked the inline comments across
browserux.cssand the modular sources using thefront-commentsClaude Code skill (Effeilo/claude-code-frontend-skills) for consistent structure, clearer intent, and uniform formatting.