LLM Reference

LLM Reference: Styling System

This is a dense reference for LLMs working in Vextro-consuming projects. It documents the complete styling system including CSS custom properties, Tailwind utility class mapping, dark mode mechanism, and override patterns.

Token Architecture

Vextro uses a three-layer token system:

  1. Primitives — Base color scale (--neutral-50 through --neutral-950), zinc-based, space-separated RGB
  2. Semantic — Meaningful tokens with --vx-* prefix (--vx-fg, --vx-surface, --vx-primary-rgb)
  3. Tailwind — @theme inline maps tokens to utility classes (text-fg, bg-surface, border-edge)

All color tokens use space-separated RGB format for opacity support: rgb(var(--vx-fg) / 0.5).

Primitive Neutral Scale

TokenLight RGBHex Approx
--neutral-50250 250 250#fafafa
--neutral-100244 244 245#f4f4f5
--neutral-200228 228 231#e4e4e7
--neutral-300212 212 216#d4d4d8
--neutral-400161 161 170#a1a1aa
--neutral-500113 113 122#71717a
--neutral-60082 82 91#52525b
--neutral-70063 63 70#3f3f46
--neutral-75052 52 56#343438
--neutral-80039 39 42#27272a
--neutral-85030 30 33#1e1e21
--neutral-90024 24 27#18181b
--neutral-9509 9 11#09090b

Semantic Foreground Tokens

TokenLight ValueDark ValueTailwind Class
--vx-fgvar(--neutral-900)244 244 245text-fg
--vx-fg-secondaryvar(--neutral-600)212 212 216text-fg-secondary
--vx-fg-mutedvar(--neutral-500)161 161 170text-fg-muted
--vx-fg-faintvar(--neutral-400)113 113 122text-fg-faint
--vx-fg-inverse255 255 25524 24 27text-fg-inverse

Semantic Surface Tokens

TokenLight ValueDark ValueTailwind Class
--vx-surface255 255 25524 24 27bg-surface
--vx-surface-subtlevar(--neutral-50)39 39 42bg-surface-subtle
--vx-surface-mutedvar(--neutral-100)63 63 70bg-surface-muted
--vx-surface-emphasisvar(--neutral-200)82 82 91bg-surface-emphasis
--vx-surface-inversevar(--neutral-900)244 244 245bg-surface-inverse

Semantic Edge (Border) Tokens

TokenLight ValueDark ValueTailwind Class
--vx-edgevar(--neutral-200)63 63 70border-edge
--vx-edge-mutedvar(--neutral-100)52 52 56border-edge-muted
--vx-edge-emphasisvar(--neutral-300)82 82 91border-edge-emphasis

Status Color Tokens

Each status color has 4 variants: base, hover, subtle (background tint), muted (stronger tint).

Primary (Blue — brand/accent)

TokenLight RGBDark RGBTailwind
--vx-primary-rgb37 99 23559 130 246text-primary, bg-primary
--vx-primary-hover29 78 21696 165 250bg-primary-hover
--vx-primary-active30 64 17537 99 235bg-primary-active
--vx-primary-subtle239 246 25523 37 84bg-primary-subtle
--vx-primary-muted191 219 25430 58 138bg-primary-muted

Success (Green)

TokenLight RGBDark RGBTailwind
--vx-success22 163 7434 197 94text-success, bg-success
--vx-success-hover21 128 6174 222 128bg-success-hover
--vx-success-subtle240 253 2445 46 22bg-success-subtle
--vx-success-muted187 247 20822 101 52bg-success-muted

Warning (Amber)

TokenLight RGBDark RGBTailwind
--vx-warning217 119 6245 158 11text-warning, bg-warning
--vx-warning-hover180 83 9251 191 36bg-warning-hover
--vx-warning-subtle255 251 23569 26 3bg-warning-subtle
--vx-warning-muted253 230 138120 53 15bg-warning-muted

Danger (Red)

TokenLight RGBDark RGBTailwind
--vx-danger220 38 38239 68 68text-danger, bg-danger
--vx-danger-hover185 28 28248 113 113bg-danger-hover
--vx-danger-subtle254 242 24269 10 10bg-danger-subtle
--vx-danger-muted254 202 202127 29 29bg-danger-muted

Info (Cyan)

TokenLight RGBDark RGBTailwind
--vx-info2 132 19914 165 233text-info, bg-info
--vx-info-hover3 105 16156 189 248bg-info-hover
--vx-info-subtle236 254 2558 51 68bg-info-subtle
--vx-info-muted165 243 25212 74 110bg-info-muted

Layout Constants

TokenValueDescription
--page-bgrgb(var(--vx-surface-subtle))Page background (light)
--page-bg-darkrgb(var(--neutral-950))Page background (dark)
--header-height60pxTop header height
--sidebar-width270pxSidebar width
--radius0.5remBase border radius

Spacing Scale (4px grid)

TokenValueTailwind Class
--space-00pxp-space-0, m-space-0, gap-space-0
--space-14pxp-space-1, m-space-1, gap-space-1
--space-28pxp-space-2, etc.
--space-312pxp-space-3, etc.
--space-416pxp-space-4, etc.
--space-520pxp-space-5, etc.
--space-624pxp-space-6, etc.
--space-832pxp-space-8, etc.
--space-1040pxp-space-10, etc.
--space-1248pxp-space-12, etc.
--space-1664pxp-space-16, etc.

Shadows

TokenValueTailwind Class
--shadow-sm0 1px 2px 0 rgb(0 0 0 / 0.05)shadow-sm
--shadow-md0 4px 6px -1px rgb(0 0 0 / 0.1)shadow-md
--shadow-lg0 10px 15px -3px rgb(0 0 0 / 0.1)shadow-lg

Animation Timings

TokenValueTailwind Class
--transition-fast150msduration-fast
--transition-base200msduration-base
--transition-slow300msduration-slow

Easing Functions

TokenValueTailwind Class
--ease-outcubic-bezier(0.16, 1, 0.3, 1)ease-out
--ease-in-outcubic-bezier(0.65, 0, 0.35, 1)ease-in-out
--ease-defaultcubic-bezier(0.25, 1, 0.5, 1)ease-default

Border Radius

Tailwind ClassComputed Value
rounded-xlcalc(var(--radius) + 4px) = 0.75rem
rounded-lgvar(--radius) = 0.5rem
rounded-mdcalc(var(--radius) - 2px) = 0.375rem
rounded-smcalc(var(--radius) - 4px) = 0.25rem

Custom Text Sizes

Tailwind ClassSize
text-2sm0.8125rem (13px)
text-2xs0.6875rem (11px)

Dark Mode Mechanism

Dark mode is activated by either:

  • .dark class on a parent element
  • [data-theme="dark"] attribute

The custom variant is defined as: @custom-variant dark (&:where(.dark, .dark *));

All semantic tokens are overridden inside .dark, [data-theme="dark"] selector. Theme transitions use 200ms duration with cubic-bezier(0.25, 1, 0.5, 1) easing on color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, and box-shadow.

Component CSS Classes

ClassDescription
.layout-wrapperRoot flex container, min-height: 100dvh
.vextro-sidebarSidebar shell, width: var(--sidebar-width)
.layout-sidebarDesktop sidebar (hidden on mobile)
.layout-headerMobile header (hidden on desktop)
.main-wrapperMain content flex container
.content-cardWhite card surface with border and rounded corners
.content-scrollScrollable content area with thin scrollbar
.kt-scrollable-y-autoScrollable utility with custom scrollbar styling

Override Patterns

To customize the token system in your app, override CSS custom properties after importing Vextro’s stylesheet:

/* app/src/styles/global.css */
@import "vextro/styles/vextro.css";

:root {
  /* Change the accent color to green */
  --vx-primary-rgb: 22 163 74;
  --vx-primary-hover: 21 128 61;
  --vx-primary-active: 20 83 45;
  --vx-primary-subtle: 240 253 244;
  --vx-primary-muted: 187 247 208;

  /* Increase sidebar width */
  --sidebar-width: 300px;
}

.dark,
[data-theme="dark"] {
  --vx-primary-rgb: 34 197 94;
  --vx-primary-hover: 74 222 128;
  --vx-primary-active: 22 163 74;
  --vx-primary-subtle: 5 46 22;
  --vx-primary-muted: 22 101 52;
}

Best Practices

  • To ensure dark mode compatibility, use semantic tokens (--vx-fg, --vx-surface, etc.) instead of hardcoded hex or rgb colors.
  • Avoid CSS variable fallbacks with light-mode defaults (e.g., var(--color, #f3f4f6)) — if a token is missing, add it to the token system instead.
  • Prefer Tailwind semantic classes (text-fg, bg-surface, border-edge) over fixed Tailwind colors (text-gray-500, bg-white).
  • In scoped <style> blocks, reference tokens as rgb(var(--vx-fg)), rgb(var(--vx-surface)), etc.
  • SVG data URIs with embedded colors should include .dark class overrides for the alternate palette.
  • For opacity support, use the rgb(var(--vx-fg) / 0.5) format since all tokens store space-separated RGB values.
  • Components should be verified in both light and dark mode to ensure full theme compatibility.
Previous
Release & Versioning