Skip to main content
theming

Theming

DevClub UI employs an architectural design system engineered for high visual fidelity, laser-sharp contrast, and smooth theme transitions.

CSS Design Tokens

All components reference semantic CSS variables declared on the root element and dark selector. Below is the reference table of core palette tokens:

VariableValues (Light / Dark)Usage
--background#fdfdfd / #050505Main application background canvas
--foreground#09090b / #f4f4f5High-contrast text and active icons
--muted#f4f4f5 / #18181bMuted background for chips, inputs, code panels
--muted-foreground#71717a / #a1a1aaSecondary metadata and caption text
--borderrgba(0,0,0,0.12) / rgba(255,255,255,0.12)Primary bounding borders for cards and sections
--border-subtlergba(0,0,0,0.08) / rgba(255,255,255,0.08)Subtle inner dividers and secondary gridlines
--border-hairlinergba(0,0,0,0.14) / rgba(255,255,255,0.16)High-precision edge highlights and rulers
--card#ffffff / #0c0c0eCard surfaces, paired with --card-foreground for text
--primary#18181b / #f4f4f5Solid emphasis fills, paired with --primary-foreground
--panel#ffffff / #151517Elevated dialogs, floating toolbars, and studios
--linergba(0,0,0,0.08) / rgb(255,255,255,0.08)Architectural blueprint and grid lines
--line-strongrgba(0,0,0,0.14) / rgb(255,255,255,0.16)Stronger outlines and focus borders
--text#09090b / #f2f2f3Text inside panels and inputs
--faint#a1a1aa / #56565cPlaceholders and faint hints
--ink#ffffff / #0b0b0cInverse text, the opposite of --text

Tailwind CSS v4 Integration

Declare the variables on :root and .dark, then map them to Tailwind colors in an @theme inline block. The mapping is what turns each variable into utilities such as bg-background, text-muted-foreground and border-border. Without it, those classes are not generated.

src/app/globals.css
1
@import "tailwindcss";
2
 
3
@custom-variant dark (&:where(.dark, .dark *));
4
 
5
:root {
6
--background: #fdfdfd;
7
--foreground: #09090b;
8
--border-subtle: rgba(0, 0, 0, 0.08);
9
--border-hairline: rgba(0, 0, 0, 0.14);
10
--pattern-line: rgba(0, 0, 0, 0.16);
11
--pattern: rgba(0, 0, 0, 0.12);
12
--border: rgba(0, 0, 0, 0.12);
13
--muted: #f4f4f5;
14
--muted-foreground: #71717a;
15
--primary: #18181b;
16
--primary-foreground: #ffffff;
17
--line: rgba(0, 0, 0, 0.08);
18
--line-strong: rgba(0, 0, 0, 0.14);
19
--panel: #ffffff;
20
--text: #09090b;
21
--faint: #a1a1aa;
22
--ink: #ffffff;
23
--card: #ffffff;
24
--card-foreground: #09090b;
25
}
26
 
27
.dark {
28
--background: #050505;
29
--foreground: #f4f4f5;
30
--border-subtle: rgba(255, 255, 255, 0.08);
31
--border-hairline: rgba(255, 255, 255, 0.16);
32
--pattern-line: rgba(255, 255, 255, 0.1);
33
--pattern: rgba(255, 255, 255, 0.08);
34
--border: rgba(255, 255, 255, 0.12);
35
--muted: #18181b;
36
--muted-foreground: #a1a1aa;
37
--primary: #f4f4f5;
38
--primary-foreground: #09090b;
39
--line: rgb(255 255 255 / 0.08);
40
--line-strong: rgb(255 255 255 / 0.16);
41
--panel: #151517;
42
--text: #f2f2f3;
43
--faint: #56565c;
44
--ink: #0b0b0c;
45
--card: #0c0c0e;
46
--card-foreground: #f4f4f5;
47
}
48
 
49
@theme inline {
50
--color-background: var(--background);
51
--color-foreground: var(--foreground);
52
--color-border: var(--border);
53
--color-border-subtle: var(--border-subtle);
54
--color-border-hairline: var(--border-hairline);
55
--color-muted: var(--muted);
56
--color-muted-foreground: var(--muted-foreground);
57
--color-primary: var(--primary);
58
--color-primary-foreground: var(--primary-foreground);
59
--color-line: var(--line);
60
--color-line-strong: var(--line-strong);
61
--color-panel: var(--panel);
62
--color-text: var(--text);
63
--color-faint: var(--faint);
64
--color-ink: var(--ink);
65
--color-card: var(--card);
66
--color-card-foreground: var(--card-foreground);
67
--font-sans: var(--font-poppins), sans-serif;
68
--font-serif: var(--font-gambetta), Georgia, serif;
69
--font-poppins: var(--font-poppins), sans-serif;
70
}

If your project already ran npx shadcn@latest init, keep its variables and add any DevClub tokens that are missing, such as --border-subtle, --border-hairline, --panel, --line, --line-strong, --text, --faint and --ink, with matching --color-* entries.

Smooth View Transitions

AnimatedThemeToggler uses the native View Transitions API with polygon clipping paths to deliver ultra-smooth, 60fps circular and geometric ripples across the canvas.

Accessibility & Contrast

Foreground and background tokens meet WCAG AAA standards with a contrast ratio exceeding 18:1 in both light and dark modes. Muted text meets WCAG AA standards.