-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsemantics.css
More file actions
191 lines (178 loc) · 9.92 KB
/
Copy pathsemantics.css
File metadata and controls
191 lines (178 loc) · 9.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/* =============================================================================
geeklego v2 — SEMANTICS (Tier 2)
ShadCN / Tailwind standard vocabulary, aliased to geeklego PRIMITIVES.
This is the INTERFACE components consume: bg-primary, text-primary-foreground,
border-border, ring-ring, etc. — zero custom vocabulary.
Generated by the Geeklego v2 Token Editor.
============================================================================= */
/* ---------------------------------------------------------------------------
1 · Semantic tokens — light (default). Each aliases a primitive.
--------------------------------------------------------------------------- */
:root {
--background: var(--color-neutral-0);
--foreground: var(--color-neutral-900);
--primary: var(--color-neutral-900);
--primary-foreground: var(--color-neutral-0);
--secondary: var(--color-neutral-100);
--secondary-foreground: var(--color-neutral-900);
--muted: var(--color-neutral-100);
--muted-foreground: var(--color-neutral-900);
--accent: var(--color-neutral-100);
--accent-foreground: var(--color-neutral-900);
--destructive: var(--color-error-500);
--destructive-foreground: var(--color-neutral-0);
--success: var(--color-success-500);
--success-foreground: var(--color-neutral-0);
--warning: var(--color-warning-500);
--warning-foreground: var(--color-neutral-0);
--info: var(--color-info-500);
--info-foreground: var(--color-neutral-0);
--border: var(--color-neutral-200);
--input: var(--color-neutral-200);
--ring: var(--color-brand-600);
--card: var(--color-neutral-0);
--card-foreground: var(--color-neutral-900);
--popover: var(--color-neutral-0);
--popover-foreground: var(--color-neutral-900);
--sidebar-bg: var(--color-neutral-50);
--sidebar-foreground: var(--color-neutral-900);
--sidebar-border: var(--color-neutral-200);
--sidebar-accent: var(--color-neutral-100);
--sidebar-accent-foreground: var(--color-neutral-900);
--sidebar-ring: var(--color-brand-600);
/* ShadCN expects a single --radius; component utilities derive sm/md/lg from it. */
--radius: var(--radius-lg);
--chart-1: var(--color-brand-500);
--chart-2: var(--color-accent-500);
--chart-3: var(--color-success-500);
--chart-4: var(--color-warning-500);
--chart-5: var(--color-info-500);
--brand-emphasis: var(--color-brand-600);
--brand-foreground: var(--color-neutral-0);
--brand-border: var(--color-brand-600);
--brand-subtle: var(--color-brand-50);
--brand-ring: var(--color-brand-600);
--border-strong: var(--color-neutral-300);
--border-muted: var(--color-neutral-100);
}
/* ---------------------------------------------------------------------------
2 · Register semantics as Tailwind v4 utilities.
`inline` => utilities resolve var() at runtime, so .dark overrides work.
--------------------------------------------------------------------------- */
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-success: var(--success);
--color-success-foreground: var(--success-foreground);
--color-warning: var(--warning);
--color-warning-foreground: var(--warning-foreground);
--color-info: var(--info);
--color-info-foreground: var(--info-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-sidebar-bg: var(--sidebar-bg);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-ring: var(--sidebar-ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--color-brand-emphasis: var(--brand-emphasis);
--color-brand-foreground: var(--brand-foreground);
--color-brand-border: var(--brand-border);
--color-brand-subtle: var(--brand-subtle);
--color-brand-ring: var(--brand-ring);
--color-border-strong: var(--border-strong);
--color-border-muted: var(--border-muted);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
}
/* ---------------------------------------------------------------------------
2b · Safelist — always generate the semantic color utilities (see note above).
--------------------------------------------------------------------------- */
@source inline("{hover:,focus:,}{bg,text}-{background,foreground,primary,primary-foreground,secondary,secondary-foreground,muted,muted-foreground,accent,accent-foreground,destructive,destructive-foreground,success,success-foreground,warning,warning-foreground,info,info-foreground,card,card-foreground,popover,popover-foreground,sidebar-bg,sidebar-foreground,sidebar-accent,sidebar-accent-foreground,chart-1,chart-2,chart-3,chart-4,chart-5,brand-emphasis,brand-foreground,brand-border,brand-subtle,brand-ring,border-strong,border-muted}");
@source inline("border-{border,input,sidebar-border,destructive,success,warning,info,brand-border,border-strong,border-muted}");
@source inline("ring-{ring,sidebar-ring,brand-ring}");
/* ---------------------------------------------------------------------------
3 · CUSTOM VARIANTS — namespaced --ext-<component>-<variant>-* tokens.
Kept OUTSIDE the core semantic set. These are the brand-variant seam;
the gamified Button is the canary for whether this stays clean at scale.
Note: --ext-* are still chained to primitives, never hardcoded.
--------------------------------------------------------------------------- */
:root {
--ext-button-gamified-bg: var(--color-accent-500);
--ext-button-gamified-bg-hover: var(--color-accent-400);
--ext-button-gamified-bg-active: var(--color-accent-600);
--ext-button-gamified-foreground: var(--color-neutral-0);
--ext-button-gamified-ring: var(--color-accent-300);
--ext-button-gamified-shadow: 0 2px 0 0 var(--color-accent-700);
}
@theme inline {
--color-ext-button-gamified-bg: var(--ext-button-gamified-bg);
--color-ext-button-gamified-bg-hover: var(--ext-button-gamified-bg-hover);
--color-ext-button-gamified-bg-active: var(--ext-button-gamified-bg-active);
--color-ext-button-gamified-foreground: var(--ext-button-gamified-foreground);
--color-ext-button-gamified-ring: var(--ext-button-gamified-ring);
}
/* ---------------------------------------------------------------------------
4 · Disclosure animations — register `animate-accordion-down/up` utilities.
These drive the Radix Accordion open/close transition off the
--radix-accordion-content-height var Radix measures at runtime. Defining
them in @theme is what makes Tailwind v4 emit the animate-* utilities.
Not tokens — geeklego-level motion shared by collapsible components.
Durations chain to the governed motion vocabulary (var(--duration-*))
per the Motion Duration ADR — never hardcode a duration here.
--------------------------------------------------------------------------- */
@theme {
--animate-accordion-down: accordion-down var(--duration-normal) ease-out;
--animate-accordion-up: accordion-up var(--duration-normal) ease-out;
@keyframes accordion-down {
from { height: 0; }
to { height: var(--radix-accordion-content-height); }
}
@keyframes accordion-up {
from { height: var(--radix-accordion-content-height); }
to { height: 0; }
}
/* Collapsible — same technique as accordion, off Radix's
--radix-collapsible-content-height measurement. */
--animate-collapsible-down: collapsible-down var(--duration-normal) ease-out;
--animate-collapsible-up: collapsible-up var(--duration-normal) ease-out;
@keyframes collapsible-down {
from { height: 0; }
to { height: var(--radix-collapsible-content-height); }
}
@keyframes collapsible-up {
from { height: var(--radix-collapsible-content-height); }
to { height: 0; }
}
/* Caret blink — the fake cursor in InputOTP slots (input-otp drives a single
hidden input, so each slot paints its own blinking caret). Not a token —
geeklego-level motion shared by the OTP field. */
--animate-caret-blink: caret-blink var(--duration-spin) ease-out infinite;
@keyframes caret-blink {
0%, 70%, 100% { opacity: 1; }
20%, 50% { opacity: 0; }
}
}