CSS audit (2026-11-13)
Every stylesheet reviewed, what moved to Tailwind, what stayed and why.
Audit date: 2026-11-13. Decision record: ADR 018. Total CSS went from 3,264 to 1,455 lines.
Files reviewed
| File | Lines before | Outcome |
|---|---|---|
apps/admin/src/styles.css | 594 | Removed. Layout, sidebar, KPI tiles, charts, forms and environment cards moved to utilities in the components |
apps/playground/src/styles.css | 877 | Removed. Workspace, chat, call, presence and event log moved to utilities; 23 lines retained in playground.css |
apps/docs/app/globals.css | 527 | Reduced to 154. Landing page, 404, logo and buttons moved to utilities; Fumadocs overrides kept |
packages/brand/components.css | 1,103 | Kept as the shared component layer (1,042), now in @layer base/@layer components; duplicate layout helpers removed |
packages/brand/tokens.css | 159 | Kept. Design tokens and keyframes (two keyframes moved in from components) |
packages/brand/fonts.css | 4 | Kept. Self-hosted font imports |
Inline style={{…}} props (98) | n/a | Converted except values computed at runtime |
| SCSS/Sass, CSS Modules | none | n/a |
New files: packages/brand/theme.css (Tailwind theme bridge, 49 lines), apps/admin/src/app.css and apps/playground/src/app.css (Tailwind entry points, 6 lines each), apps/docs/components/classes.ts (shared class recipes).
Retained CSS and why
| Where | What | Why it stays CSS |
|---|---|---|
packages/brand/components.css | Buttons, cards, badges, form controls, switch, tabs, segmented control, tables, alerts, skeleton, empty state, progress, dialogs and drawer, menus, tooltips, toasts, code panel, 404 | Shared by two apps; uses pseudo-elements (.switch::after, .tab::after, [data-tip]::after), native <dialog> transitions (@starting-style, ::backdrop, allow-discrete), :user-invalid, attribute-driven tooltips via attr(), and a data-URI select arrow. As utilities these would repeat long strings in each app. Wrapped in @layer components so utilities override them. |
packages/brand/components.css (@layer base) | Element defaults (body type, headings, links, focus ring, scrollbars) | Replaces Tailwind preflight in the Vite apps so existing element defaults are unchanged |
packages/brand/tokens.css | Tokens with light-dark(), theme switching, keyframes, reduced-motion override | Source of truth for the Tailwind theme; keyframes are referenced by --animate-* |
apps/playground/src/playground.css | .call-stage .lk-grid-layout, .lk-participant-tile, .lk-participant-placeholder svg; lk-slide-in-log keyframes | @livekit/components-styles is unlayered, so overrides must be unlayered and more specific; utilities in a layer lose |
apps/docs/app/globals.css | Fumadocs color variables, prose links, Shiki code surface, sidebar transitions, callout entrance, landing code-tab internals, overflow-x: clip | Third-party (Fumadocs, Shiki) internals have no class hooks |
Inline styles kept
Only runtime values: chart height, bar animation delays and tooltip coordinates (apps/admin/src/lib/chart.tsx), and the per-card entrance delay on the docs landing page.
Verification
vite buildfor console and playground andnext build+ export checks for docs pass.- A script compared every class token in the console and playground sources with the built CSS: every token has a rule.
- Browser checks against the local stack: console overview, project analytics, environments, mobile drawer and scrim; playground connect, messaging inbox and chat, event log overlay, call pre-join and in-call view with LiveKit tiles and controls; docs landing, search and 404.
- Two regressions found and fixed during checks: the event-log list kept the browser's default list padding (no preflight), and the docs hero glow caused horizontal scrolling.
Remaining inconsistencies and follow-up
apps/docskeeps its own logo sizing (24 px mark, 14.5 px word) compared with the brand component (26 px, 15 px); intentional for the Fumadocs nav height.- Breakpoints use the existing values (
max-[960px],max-[760px],max-[1180px],max-sm) rather than Tailwind's defaults, to preserve layouts exactly. Normalizing them tolg/mdis a design decision. - Dark/light theming was checked in dark mode in the browser; light mode relies on the same
light-dark()tokens and was not visually re-checked in this audit. - The brand component layer could later become React components in a shared package if a third app needs them.