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.
scripts/generate-css-system-data.ts. It is a point-in-time snapshot — re-run the generator after CSS changes to refresh it.- 165Design tokens
- 9Global stylesheets
- 177Module CSS files
- 27,221Module CSS lines
- 6TS 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(--*)):
styles/tokens.css— Design tokens (:root custom properties) — imported first (235 lines)styles/utilities.css— Global a11y/layout utilities (.bs-sr-only, .bs-skip-link) (40 lines)styles/dashboard-form-primitives.css— Shared form controls (consumed via formStyles.ts) (218 lines)styles/route-state-primitives.css— Route error/empty/retry states (via stateActionClasses.ts) (116 lines)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.css— Dashboard shell classes (via styleConstants.ts); imported by (protected)/layout (764 lines)styles/canvas-layers.css— Canvas viewport layer classes; imported by canvas/layout (60 lines)styles/canvas.css— Canvas 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?