Skip to main content
DocumentationOverview & Cascade

Overview & Cascade

How Builder Studio styling is organized: the global stylesheet entry point, the @import cascade order, and the layout-scoped sheets that bypass it.

Builder Studio styles with plain CSS — design tokens as CSS custom properties, global stylesheets for cross-cutting rules, and *.module.css for component-scoped styling. There is no Tailwind or CSS-in-JS. This section maps that system so tokens, cascade order, and file ownership are visible in one place.

Generated snapshot
Every value on these pages is generated directly from the BuilderStudio-main source by scripts/generate-css-system-data.ts. It is a point-in-time snapshot — re-run the generator after CSS changes to refresh it.
SourceBuilderStudio-mainCommit6fd4036fcDate2026-05-29Branchmain
  • 165
    Design tokens
  • 9
    Global stylesheets
  • 177
    Module CSS files
  • 27,221
    Module CSS lines
  • 6
    TS class contracts

The cascade

The root entry point is app/globals.css, imported once by app/layout.tsx. Before any of its own rules, it @imports the shared layers in this exact order — so later files can rely on earlier ones (tokens first, so everything downstream can read var(--*)):

  1. styles/tokens.css — Design tokens (:root custom properties) — imported first (235 lines)
  2. styles/utilities.css — Global a11y/layout utilities (.bs-sr-only, .bs-skip-link) (40 lines)
  3. styles/dashboard-form-primitives.css — Shared form controls (consumed via formStyles.ts) (218 lines)
  4. styles/route-state-primitives.css — Route error/empty/retry states (via stateActionClasses.ts) (116 lines)
  5. styles/animations.css — Shared @keyframes + .animate-* classes (63 lines)

After those imports, app/globals.css defines the CSS reset, base element defaults, and accessibility rules that the rest of the app inherits.

Layout-scoped global sheets

These global stylesheets are not reached through globals.css. They are imported directly by nested route layouts, so their rules only load for those routes:

  • styles/dashboard-shell.cssDashboard shell classes (via styleConstants.ts); imported by (protected)/layout (764 lines)
  • styles/canvas-layers.cssCanvas viewport layer classes; imported by canvas/layout (60 lines)
  • styles/canvas.cssCanvas global interaction rules; imported by canvas/layout (113 lines)

For the full token catalogue see Design Tokens; for the complete file inventory and the TypeScript class-name contracts see CSS Files & Contracts; for scanned drift metrics and verified bugs see Audit & Drift.

Was this page helpful?