This design system provides comprehensive design tokens and atomic utilities extracted from the Desktop.png mockup, following W3C DTCG standards with modern CSS features.

Design Tokens

W3C DTCG-compliant tokens


File: src/styles/design-tokens.json

Complete CSS

Tokens + Tailwind-style utilities


File: src/styles/design-system.css

Documentation

Comprehensive usage guide


File: src/styles/DESIGN-SYSTEM.md

✅ CSS Custom Properties - All design tokens as CSS variables

✅ Atomic Utilities - Comprehensive Tailwind-style utility classes

✅ Container Query Variants - Responsive utilities (sm:, md:, lg:, xl:)

✅ State Variants - Hover, focus, and active states

✅ Accessibility - Reduced motion, forced colors, WCAG-compliant focus

✅ Cascade Layers - Organized with @layer for predictable specificity

✅ Logical Properties - Better i18n support (RTL languages)


  1. Import the design system in your global CSS or layout:

    @import '/styles/design-system.css';
  2. Or link in HTML:

    <link rel="stylesheet" href="/styles/design-system.css">
  3. Start using utilities:

    <div class="bg-primary-600 text-white p-lg rounded-md">
    Utility-first design!
    </div>

—color-primary-400
#2D7AB8
Lighter primary for hover states
—color-primary-500
#195A8E
Primary brand blue (header)
—color-primary-600
#0F5A96
Accent blue (buttons, interactive)
—color-primary-700
#0D4A7A
Darker primary for active states
TokenValueUsage
--color-primary-400#2D7AB8Lighter primary for hover states
--color-primary-500#195A8EPrimary brand blue (header)
--color-primary-600#0F5A96Accent blue (buttons, interactive)
--color-primary-700#0D4A7ADarker primary for active states
—color-accent-300
#C0E5FF
Light backgrounds
—color-accent-400
#A8DBFF
Decorative elements
—color-accent-500
#87CEEB
Secondary accents
TokenValueUsage
--color-accent-300#C0E5FFLight backgrounds
--color-accent-400#A8DBFFDecorative elements
--color-accent-500#87CEEBSecondary accents
—color-neutral-50
#F9FAFB
Off-white background
—color-neutral-100
#F3F4F6
Light gray background
—color-neutral-200
#E5E7EB
Border gray
—color-neutral-300
#CDD5E3
Placeholder background
—color-neutral-400
#9CA3AF
Disabled text
—color-neutral-500
#6B7280
Secondary text
—color-neutral-600
#4B5563
Body text
—color-neutral-700
#374151
Primary text
—color-neutral-900
#111827
Heading text
TokenValueUsage
--color-neutral-50#F9FAFBOff-white background
--color-neutral-100#F3F4F6Light gray background
--color-neutral-200#E5E7EBBorder gray
--color-neutral-300#CDD5E3Placeholder background
--color-neutral-400#9CA3AFDisabled text
--color-neutral-500#6B7280Secondary text
--color-neutral-600#4B5563Body text
--color-neutral-700#374151Primary text
--color-neutral-900#111827Heading text
TokenValuePixelsUsage
--font-size-xs0.75rem12pxExtra small text
--font-size-sm0.875rem14pxSmall text, labels
--font-size-base1rem16pxBase font size
--font-size-lg1.125rem18pxLarge body text
--font-size-xl1.25rem20pxSubheadings
--font-size-2xl1.5rem24pxSection headings
--font-size-3xl2rem32pxPage headings
--font-size-4xl3rem48pxLarge headings
--font-size-5xl4rem64pxDisplay headings
TokenValueName
--font-weight-regular400Regular
--font-weight-medium500Medium
--font-weight-semibold600Semi-bold
--font-weight-bold700Bold
TokenValueUsage
--line-height-tight1.1Headings
--line-height-snug1.25Tight paragraphs
--line-height-normal1.5Body text
--line-height-relaxed1.625Long-form content
--line-height-loose1.75Very spacious text

Mathematical progression using rem units (based on 4px grid):

TokenValuePixelsMultiplier
--spacing-scale-xs0.25rem4px1×
--spacing-scale-sm0.5rem8px2×
--spacing-scale-md1rem16px4×
--spacing-scale-lg1.5rem24px6×
--spacing-scale-xl2rem32px8×
--spacing-scale-2xl3rem48px12×
--spacing-scale-3xl4rem64px16×
TokenValuePixelsUsage
--border-radius-sm0.25rem4pxSmall elements
--border-radius-md0.5rem8pxMedium elements
--border-radius-lg0.75rem12pxLarge elements
--border-radius-xl1rem16pxExtra large
--border-radius-full9999px∞Pills/circles
TokenValueUsage
--shadow-sm0 1px 2px 0 rgba(0, 0, 0, 0.05)Subtle
--shadow-md0 4px 6px -1px rgba(0, 0, 0, 0.1)Medium
--shadow-lg0 10px 15px -3px rgba(0, 0, 0, 0.1)High elevation
--shadow-xl0 20px 25px -5px rgba(0, 0, 0, 0.1)Maximum

<p class="text-primary-600">Primary text</p>
<p class="text-neutral-500">Secondary text</p>
<p class="text-neutral-900">Heading text</p>
<p class="text-white">White text</p>
<!-- All sides -->
<div class="p-md">Padding all sides (16px)</div>
<!-- Horizontal (inline) -->
<div class="px-lg">Horizontal padding (24px)</div>
<!-- Vertical (block) -->
<div class="py-md">Vertical padding (16px)</div>
<!-- Individual sides -->
<div class="pt-lg">Top padding (24px)</div>
<div class="pr-md">Right padding (16px)</div>
<div class="pb-xl">Bottom padding (32px)</div>
<div class="pl-sm">Left padding (8px)</div>
<!-- Font families -->
<h1 class="font-display">Display heading</h1>
<p class="font-sans">Body text</p>
<!-- Font sizes -->
<h1 class="text-5xl">64px heading</h1>
<h2 class="text-3xl">32px heading</h2>
<p class="text-lg">18px body text</p>
<!-- Font weights -->
<p class="font-bold">Bold text</p>
<p class="font-semibold">Semi-bold text</p>
<p class="font-medium">Medium text</p>
<!-- Line heights -->
<h1 class="leading-tight">Tight heading</h1>
<p class="leading-normal">Normal body text</p>
<p class="leading-relaxed">Relaxed paragraphs</p>
<!-- Border radius -->
<div class="rounded-md">Medium rounded corners</div>
<button class="rounded-full">Pill-shaped button</button>
<!-- Shadows -->
<div class="shadow-md">Medium shadow</div>
<div class="shadow-lg">Large shadow</div>
<!-- Container -->
<div class="container">
Centered container with max-width 1200px
</div>

Use container query variants for responsive design based on container size:

  • sm: 640px (40rem)
  • md: 768px (48rem)
  • lg: 1024px (64rem)
  • xl: 1280px (80rem)
<h1 class="text-2xl md:text-3xl lg:text-4xl xl:text-5xl">
Responsive heading that grows with container
</h1>

<button class="bg-primary-600 hover:bg-primary-700 text-white">
Button with hover state
</button>
<a href="#" class="text-neutral-700 hover:text-primary-600">
Link with hover color
</a>
<input class="focus:outline-primary-600" type="text" />
<button class="focus:ring-primary-500">
Button with focus ring
</button>
<button class="bg-primary-600 active:bg-primary-700 active:scale-95">
Button with active/pressed state
</button>

<section class="bg-white py-3xl">
<div class="container">
<h1 class="font-display text-4xl md:text-5xl font-bold text-neutral-900 mb-lg">
We Serve
</h1>
<p class="text-lg md:text-xl leading-relaxed text-neutral-600 mb-xl">
We serve almost 60 people every seconds Saturday all while providing
necessary recourses like showers, Clothes, and hair care.
</p>
<button class="px-lg py-md bg-primary-600 hover:bg-primary-700
text-white rounded-sm font-semibold">
Learn More
</button>
</div>
</section>
<article class="bg-white p-lg rounded-lg shadow-md border border-neutral-200
hover:shadow-lg">
<h2 class="font-display text-2xl font-bold text-neutral-900 mb-md">
Card Title
</h2>
<p class="text-base leading-normal text-neutral-600 mb-lg">
Card content with proper spacing and typography that maintains
consistency across your application.
</p>
<button class="px-lg py-md bg-primary-600 hover:bg-primary-700
active:scale-95 text-white rounded-sm font-semibold
focus:ring-primary-500">
Action Button
</button>
</article>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-lg">
<div class="bg-neutral-50 p-lg rounded-md">
<h3 class="text-sm text-neutral-500 mb-xs">Showers</h3>
<p class="text-4xl font-bold text-primary-600">64</p>
<p class="text-sm text-neutral-400 mt-xs">Requested</p>
</div>
<div class="bg-neutral-50 p-lg rounded-md">
<h3 class="text-sm text-neutral-500 mb-xs">Clothes</h3>
<p class="text-4xl font-bold text-primary-600">64</p>
<p class="text-sm text-neutral-400 mt-xs">Requested</p>
</div>
<div class="bg-neutral-50 p-lg rounded-md">
<h3 class="text-sm text-neutral-500 mb-xs">Haircuts</h3>
<p class="text-4xl font-bold text-primary-600">64</p>
<p class="text-sm text-neutral-400 mt-xs">Requested</p>
</div>
</div>

The design system includes automatic accessibility support:

Respects prefers-reduced-motion preference to minimize or disable animations for users who prefer reduced motion.

Adapts to forced colors mode (high contrast mode) for better visibility.

All interactive elements have WCAG-compliant focus indicators with 2px outline and proper contrast ratios.

Uses logical properties (padding-inline, margin-block, etc.) for better internationalization and RTL language support.


You can mix utilities with custom CSS using the design tokens:

.custom-component {
/* Use tokens for consistency */
background: var(--color-surface-base);
padding: var(--spacing-scale-lg);
border-radius: var(--border-radius-md);
box-shadow: var(--shadow-md);
color: var(--color-text-primary);
/* Custom properties */
display: flex;
align-items: center;
gap: var(--spacing-scale-md);
}

  • Chrome/Edge 88+
  • Firefox 110+
  • Safari 16+
  • CSS Custom Properties
  • Cascade Layers (@layer)
  • Container Queries
  • Logical Properties

The design system gracefully degrades on older browsers:

  • Base utilities work with custom property support
  • Container query variants fall back to standard behavior
  • Logical properties have reasonable fallbacks

<!-- ✅ Use utility classes -->
<div class="bg-white p-lg rounded-md shadow-md">
<h2 class="text-2xl font-bold mb-md">Title</h2>
</div>
<!-- ✅ Use tokens in custom CSS -->
<style>
.component {
color: var(--color-primary-600);
padding: var(--spacing-scale-lg);
}
</style>
<!-- ❌ Don't use hardcoded values -->
<div style="background: white; padding: 24px;">
<h2 style="font-size: 24px;">Title</h2>
</div>
<!-- ❌ Don't mix utilities with inline styles -->
<div class="bg-white" style="padding: 24px;">
<h2 class="text-2xl">Title</h2>
</div>

If using SCSS in your project, you can import the design system and use tokens:

// Import design system
@import '/styles/design-system.css';
// Use tokens in SCSS
.my-component {
background: var(--color-primary-600);
padding: var(--spacing-scale-lg);
border-radius: var(--border-radius-md);
&:hover {
background: var(--color-primary-700);
}
}


Generated from: Desktop.png mockup

Last Updated: 2025-01-23

Format: W3C Design Tokens Community Group (DTCG)

Total Tokens: 65+

Categories: Colors, Typography, Spacing, Layout