Repository navigation
[5.0.0] – 2026-06-01
Why This Is A Major Release
browserux.css v5 is a structural rethinking of the base around CSS as architecture: explicit cascade layers, semantic design tokens, modern color functions with graceful fallbacks, and user preferences handled through tokens instead of broad overrides.
The v4 base made BrowserUX easier to distribute and validate. The v5 base makes it easier to reason about, override, theme, and extend. Every rule now belongs to a named @layer, the token API has been renamed around semantic roles, and modern color features such as oklch(), light-dark(), and color-mix() are introduced behind @supports fallbacks so unsupported browsers keep a readable light-mode interface.
This release is intentionally breaking for projects that override BrowserUX tokens directly. The goal is to replace historical names and broad resets with a clearer long-term API.
Architecture And Cascade
-
Named BrowserUX cascade layers
Added an explicit internal layer contract:@layer bux.tokens, bux.browser-default, bux.preferences, bux.native-ui;
The declared order is the cascade-priority order.
bux.native-uiwins overbux.preferences, which wins overbux.browser-default, which wins overbux.tokens. Application rules outside a layer still override BrowserUX naturally without specificity fights or!important. -
Dedicated layer declaration module
Added a sharedsrc/modules/layers.cssentry so all public bundles can declare the same layer order before importing their functional modules. -
Removed the legacy
browserux.layer.cssbundle
The separate bundle that wrapped the whole base in a single@layer browseruxhas been removed. BrowserUX now ships its own internal layer architecture directly through the regular bundles.
Design Tokens And Color System
-
Semantic token API
Renamed the public token surface from value-oriented or historical names to role-based names. Examples:--bux-page-bg->--bux-color-bg--bux-page-color->--bux-color-text--bux-color-primary->--bux-color-accent--bux-color-secondary->--bux-color-accent-2--bux-typo-font-family->--bux-font-body--bux-scrollbar-vertical-width->--bux-scrollbar-width
-
Four-level progressive color enhancement
Color tokens now degrade in layers:- hex fallbacks for every browser
- OKLCH palette upgrades behind
@supports (color: oklch(0% 0 0)) - adaptive light/dark semantic tokens behind
@supports (color: light-dark(white, black)) - relational derived tokens behind
@supports (color: color-mix(in oklab, white, black))
-
light-dark()replaces the dark-mode override block
Dark-mode values now live next to their light-mode counterpart in semantic tokens instead of being scattered through a separate@media (prefers-color-scheme: dark)override block. -
Derived color tokens
Added derived tokens such as--bux-color-accent-hover,--bux-color-accent-soft,--bux-color-valid-surface,--bux-color-invalid-surface,--bux-focus-color, and--bux-selection-bg. When the accent, background, or validation colors change, these derived tokens follow automatically in supporting browsers.
Base And Behavior Changes
-
Reduced motion now uses motion tokens
Replaced the universalprefers-reduced-motionreset (* { animation-duration: 0s !important; transition-duration: 0s !important; }) with token overrides:--bux-duration-fast: 1ms; --bux-duration-base: 1ms;
Components using BrowserUX motion tokens adapt automatically, while global application animations are no longer force-cancelled by the base.
-
Focus rules now use zero-specificity selectors
Focus handling is scoped through:where(...)so the BrowserUX focus fallback remains easy to override. The focus target list now includes[contenteditable]. -
Native browser UI layer refined
Selection, scrollbars, focus, form validation states, progress, range thumbs, file selector buttons, and dialog styles now use the new semantic tokens and live inside@layer bux.native-ui. -
Experimental find-in-page highlight styling
Added progressive styling for::search-textand::search-text:current. Unsupported browsers safely keep their native find-in-page highlight. -
Standard file selector pseudo-element
Replaced the legacy WebKit upload button pseudo-element with::file-selector-button.
Breaking Changes
-
Token renames
Projects overriding BrowserUX variables must migrate to the new token names. The old token names are not kept as aliases in v5. -
Dark-mode customization moved to semantic tokens
Projects that previously overrode the v4 dark-mode block should now override the relevant semantic tokens, especially--bux-color-bg,--bux-color-text,--bux-color-muted,--bux-color-border, and the accent/validation tokens. -
Reduced-motion behavior is less global
BrowserUX no longer force-cancels every animation and transition in the document. Projects that need a hard global motion kill switch should add that policy in their own application layer. -
browserux.layer.cssremoved from the public package surface
Imports ofbrowserux.css/browserux.layer.cssandbrowserux.css/dist/browserux.layer.cssmust be replaced withbrowserux.css/browserux.cssor one of the modular bundles.
Documentation And Developer Experience
- Updated the public bundle documentation to remove
browserux.layer.cssand reflect the new internal layer architecture. - Updated the changelog and references to describe the v5 token migration and the new BrowserUX layer contract.