Theming

-axxy- ships interaction and accessibility behavior without requiring any stylesheet. Because it operates directly on standard HTML and W3C ARIA states in light DOM, any Design System can layer its visual identity onto standard selectors such as [role="tablist"], [aria-selected="true"], and [aria-expanded]. For projects that want a clean, accessible starting point out of the box, axxy-theming (located in packages/axxy-theming/) provides a standalone, non-opinionated default theme built around CSS custom properties and cascade layers.

Using the default theme

Import the full bundle to load both design tokens and component styles, or import individual pieces:

/* Full default theme */
import 'axxy-theming';

/* Or import tokens, components, and optional presets separately */
@import 'axxy-theming/tokens.css';
@import 'axxy-theming/components.css';
@import 'axxy-theming/themes/dark.css';
@import 'axxy-theming/themes/warm.css';

All rules in axxy-theming live inside CSS Cascade Layers (@layer axxy-tokens, axxy-theme). Any ordinary, unlayered CSS in your application automatically overrides the default theme without specificity battles or !important.

Design tokens

Every component in axxy-theming reads from --axxy-* custom properties defined on :root:

Core CSS custom properties in axxy-theming
TokenDefaultPurpose
--axxy-bg#fffPrimary page and control background
--axxy-surface#f4f7f7Subtle container surfaces (toolbars, menubars, inactive tabs, table headers)
--axxy-surface-hover#ebfaf9Hover background for interactive items
--axxy-surface-active#d5fffbSelected and pressed control surfaces
--axxy-border#9abcb9Primary control and container borders
--axxy-border-subtle#c5d9d7Secondary dividers, table cells, and subtle outlines
--axxy-text#202124Primary foreground text
--axxy-text-muted#4b5a5fSecondary labels, hints, and inactive icons
--axxy-accent#0f615aActive indicators, links, checked controls, and accents
--axxy-accent-contrast#fffText/icon color rendered on top of --axxy-accent
--axxy-focus#6840b5Visible keyboard focus ring (:focus-visible)
--axxy-danger#a61c1cInvalid input borders and error messages
--axxy-radius.35remShared corner radius for buttons, inputs, tabs, and popovers
--axxy-shadow0 6px 18px rgb(0 0 0 / .14)Elevation shadow for floating menus, tooltips, and popovers

Overriding tokens and creating custom themes

Override tokens globally on :root, or scope multiple themes with data-axxy-theme. You can switch the entire documentation site between Default, Dark, and Warm using the Theme selector in the site header.

/* Override the default theme globally */
:root {
  --axxy-accent: #1d4ed8;
  --axxy-surface-active: #dbeafe;
  --axxy-radius: .5rem;
}

/* Or define a named theme selectable via data-axxy-theme="ocean" */
[data-axxy-theme="ocean"] {
  --axxy-bg: #f8fafc;
  --axxy-surface: #e2e8f0;
  --axxy-surface-hover: #dbeafe;
  --axxy-surface-active: #bfdbfe;
  --axxy-border: #64748b;
  --axxy-accent: #0369a1;
  --axxy-focus: #7c3aed;
}

Interactive theme customizer

Try switching presets or tweaking tokens below. Changes apply live to the preview container and generate a ready-to-paste CSS snippet.

Notifications Remember choice

All controls inside this preview inherit your live --axxy-* token overrides.

Override any subset of tokens on :root or a scoped container.

Unlayered CSS overrides @layer axxy-theme cleanly without !important.

/* Adjust any token above to generate a custom theme override. */