Styling
Where design tokens and shared styles live — main.css and globals.css — and how to use them.
Aura's styling is split between the registry's shared layer and the app's themed entry. Use the registry styles for design tokens, layout, and typography; use globals for Tailwind theme and color scales.
Registry styles
main.css
Path: packages/registry/styles/main.css
This file holds the shared design-token and layout layer used across Aura.
- Root tokens (
:root):--aura(13px base),--aura-font-stack,--aura-font-quotes,--aura-grey,--aura-bg,--aura-text-primary,--aura-text-primary-inverse, accent tokens (--aura-accents-primary,--aura-accents-success,--aura-accents-info,--aura-accents-warning,--aura-accents-dangerand-bgvariants),--aura-input-radius,--aura-button-radius,--aura-input-bg,--aura-input-placeholder-color,--aura-input-border-color,--aura-radius,--aura-opacity,--aura-outline,--aura-button-hover,--aura-link,--aura-link-hover,--aura-selector,--aura-loader,--aura-skeleton-start,--aura-skeleton-end. - Layout:
.valign(flex center column),.fluid(width 100%),.halo(flex row wrap),.reverse,.aureole(grid with.one….twelvecolumns),.span-1….span-12, responsive behavior for small viewports;.aura-container,.smish,.smosh,.smash,.smush,.smesh(max-width containers). - Typography: Fluid
clamp(var(--min), var(--val), var(--max))onbody h1–h6,p, and.h1–.h6,.p; each heading sets--min,--val,--max;blockquoteshares the h4 scale;pmargin andblockquotestyling. - Utilities:
.truncate,.disabledand input/button disabled opacity,.typeahead,.action,.unset,.hide-small/.hide-medium/.hide-large(media queries),.warning/.info/.danger/.successand-textvariants. - Other:
.pad,.aura,.inputer,.skeleton(loading animation).
globals.css
Path: packages/registry/styles/globals.css
This is the Tailwind/themed entry. It imports Tailwind and defines what the theme and base layer use.
@theme inline:--spacing: 13px,--font-sans, semantic colors (--info,--success,--danger,--warningand-contrast), radius scale (--radius-sm…--radius-xl), and Tailwind color mappings forgray-*,accent-*, and semantic tokens (--primary,--primary-foreground, etc.).:root: 12-step scales--accent-1–--accent-12,--accent-a1–--accent-a12,--accent-contrast,--accent-surface,--accent-indicator,--accent-track; same for--gray-*;--primary,--primary-foreground,--secundary,--secundary-foreground; Aura tokens (--aura,--aura-font-stack,--aura-bg,--aura-text-primary, input/button/loader/skeleton mappings).- Dark mode:
@media (prefers-color-scheme: dark)overrides for accent and gray scales. @layer base: Importsmain.cssand default component styles (accordion, alert-dialog, collapsible, dialog, sidebar);htmlfont-size,mainbackground,.darksemantic overrides.
How to use them
- In an app: Import or layer the registry
globals.cssso the theme and base layer (including main.css) apply. Your app's ownglobals.csscan then add or override (e.g. import component animation CSS in@layer componentsas in the www app). - Tokens: Use
--spacingand the radius/color tokens from@themeand:rootfor margins, padding, borders, and backgrounds so Tailwind and custom CSS stay consistent. See Taste for the spacing scale and color workflow. - Layout: Use
.aureoleand.span-*for grids, and.smish–.smeshfor section containers, per the layout and spacing rules. - Typography: Prefer semantic classes
.h1–.h6,.p(or the elements themselves) so fluid sizing and line-height apply; avoid Tailwind text-size utilities for primary copy.