Repository navigation
Expand file tree
/
Copy paththeme.css
More file actions
699 lines (631 loc) · 27.9 KB
/
Copy paththeme.css
File metadata and controls
699 lines (631 loc) · 27.9 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
/**
* ClaraLight Design — tokens.
*
* This file is the source of truth for hand-authored design values.
* Components, verification and spring generation consume these tokens.
*
* ClaraLight is a *quiet, layered* design language. Surfaces stack from
* `background` (window) through `panel` (panes, sheets) to `control`
* (rows, fields, buttons). Control fills are translucent overlays of the
* layer beneath, so the same layer reads correctly over any surface.
* Color is spent sparingly: `accent` marks the primary action and
* selection, status colors carry meaning, everything else stays neutral.
*
* Dark is the default scheme when no explicit scheme class is present.
*
* Consume:
* @import "tailwindcss";
* @import "@claralight-design/react/styles.css";
*/
/* ---------------------------------------------------------------------------
* Scheme switching
* ------------------------------------------------------------------------- */
/**
* `dark` is the default, so it needs no class. `.light` opts into the warm
* scheme; `.dark` is accepted too, for consumers already using the shadcn
* convention of toggling a `dark` class on <html>.
*
* The runtime values live on `--cl-*` custom properties rather than directly
* in `@theme`, because Tailwind inlines `@theme` values at build time. The
* `@theme inline` block below maps them so utilities compile to
* `var(--cl-background)` and follow the active scheme.
*/
@custom-variant light (&:where(.light, .light *));
/* ---------------------------------------------------------------------------
* Type ramp
* ------------------------------------------------------------------------- */
@theme static {
/*
* Preferred families and platform fallbacks. Font files are not shipped
* yet — see fonts/README.md. Fallback metrics depend on installed fonts.
*/
--font-sans:
"MiSans VF", "MiSans", "PingFang SC", "SF Pro Text", system-ui, Roboto,
sans-serif;
--font-mono:
"Sarasa Mono SC", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
monospace;
--font-display:
"ChillDINGothic", "MiSans VF", "MiSans", "PingFang SC", system-ui,
sans-serif;
--font-serif: "Clara Serif Pro", ui-serif, Georgia, serif;
/*
* Step scale. Weights are the ClaraLight intent, not MiSans' axis values —
* see fonts/README.md for the non-standard VF wght axis (w400 sits at 330).
* `--text-*--font-weight` therefore only lands correctly once the real
* font is loaded; with fallback fonts the browser approximates.
*/
--text-display: 30px;
--text-display--line-height: 1.2667;
--text-display--font-weight: 700;
--text-display--letter-spacing: 0;
--text-headline: 18px;
--text-headline--line-height: 1.3333;
--text-headline--font-weight: 700;
--text-headline--letter-spacing: -0.55px;
--text-title: 16px;
--text-title--line-height: 1.3125;
--text-title--font-weight: 600;
--text-title--letter-spacing: -0.4px;
--text-body: 15px;
--text-body--line-height: 1.3333;
--text-body--font-weight: 500;
--text-body--letter-spacing: -0.5px;
--text-callout: 14px;
--text-callout--line-height: 1.3571;
--text-callout--font-weight: 600;
--text-callout--letter-spacing: -0.5px;
--text-label: 13px;
--text-label--line-height: 1.3077;
--text-label--font-weight: 700;
--text-label--letter-spacing: -0.2px;
--text-caption: 12px;
--text-caption--line-height: 1.3333;
--text-caption--font-weight: 400;
--text-caption--letter-spacing: 0;
/*
* Standalone weights, for the places a run of text steps off its ramp entry's
* own weight. The select's option rows are the case that needs them: they are
* `callout` at 400 rather than its 600, with the selected row a step heavier
* at 500 — Flutter's `callout.copyWith(fontWeight: ...)`. A menu is a list to
* scan, so its rows sit lighter than the field that opened them.
*/
--font-weight-normal: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
/* Numeric readouts: dimensions, memory, time codes. */
--text-mono: 14px;
--text-mono--line-height: 1.3;
--text-mono--font-weight: 400;
--text-mono-strong: 14px;
--text-mono-strong--line-height: 1.3;
--text-mono-strong--font-weight: 600;
}
/* ---------------------------------------------------------------------------
* Shape (smooth corners, see below)
* ------------------------------------------------------------------------- */
@theme static {
--radius-none: 0px; /* square corners; opts the surface out of the shape */
--radius-control: 8px; /* fields, rows, chips, small buttons */
--radius-medium: 12px; /* cards, grouped lists, banners, popovers */
--radius-panel: 18px; /* panels and sidebars */
--radius-sheet: 36px; /* floating bottom sheets */
--radius-dialog: 36px; /* modal dialogs */
--radius-capsule: 999px; /* segmented pills, toolbar buttons */
}
/**
* Corner smoothing.
*
* ClaraLight surfaces use smooth corners ("squircles"), not circular arcs.
*
* On the web this is *not* CSS `corner-shape`, and the distinction matters:
*
* corner-shape: superellipse() a true Lamé superellipse (squircle == n=4).
* Chromium 139+ only; Safari and Firefox drop
* the property at parse time.
* Figma corner smoothing cubic Bezier shoulders bracketing a circular
* arc, `p = (1 + xi) * R` with a `90 * (1 - xi)`
* residual arc.
*
* Those are different curve families and do not coincide. ClaraLight follows
* the design source, and the design lives in Figma, so the Figma construction
* is the correct one — it is also the same family as Apple's
* `cornerCurve = .continuous`, the closest available match to iOS.
*
* `corner-shape` is therefore deliberately unused. The shape is produced by
* `@lisse/react`, which emits the same SVG path in every engine, so Safari,
* Firefox and Chromium agree pixel for pixel. See `src/lib/squircle.tsx`.
*
* `--cl-corner-smoothing` is Figma's xi: 0 gives a plain circular arc
* identical to `border-radius`, 1 removes the arc entirely and leaves only
* Beziers. ClaraLight sits at Figma's own default.
*/
@theme static {
--cl-corner-smoothing: 0.6;
}
/* ---------------------------------------------------------------------------
* Motion (spring samples generated by scripts/gen-spring.mjs)
* ------------------------------------------------------------------------- */
@theme static {
/*
* Finite transitions. ClaraLight is deliberately quick: 140/160ms, where
* a typical web design system would sit at 200-300ms.
*/
--ease-cl-out: cubic-bezier(
0.23,
1,
0.32,
1
); /* strong deceleration, entrances */
--ease-cl-in: cubic-bezier(
0.32,
0,
0.67,
0
); /* strong acceleration, exits */
--ease-cl-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* symmetric movement */
--ease-cl-drawer: cubic-bezier(
0.32,
0.72,
0,
1
); /* iOS-like sheet/drawer */
/* Tooltip switching uses one motion curve for position and content. */
--ease-cl-tooltip-morph: var(--ease-cl-in-out);
/*
* Derived samples, not hand-authored values. Run `pnpm tokens` after
* changing the spring parameter tokens below. Overlay time is normalized
* progress; press time is seconds mapped through its release duration.
*/
--ease-cl-spring-overlay: linear(0, 0.0132 1.85%, 0.0481 3.7%, 0.0986 5.56%, 0.1595 7.41%, 0.2268 9.26%, 0.2973 11.11%, 0.3683 12.96%, 0.438 14.81%, 0.5048 16.67%, 0.5679 18.52%, 0.6265 20.37%, 0.6803 22.22%, 0.729 24.07%, 0.7728 25.93%, 0.8115 27.78%, 0.8456 29.63%, 0.8753 31.48%, 0.9009 33.33%, 0.9228 35.19%, 0.9413 37.04%, 0.9567 38.89%, 0.9695 40.74%, 0.9799 42.59%, 0.9883 44.44%, 0.995 46.3%, 1.0001 48.15%, 1.004 50%, 1.0069 51.85%, 1.0089 53.7%, 1.0101 55.56%, 1.0108 57.41%, 1.0111 59.26%, 1.011 61.11%, 1.0107 62.96%, 1.0101 64.81%, 1.0095 66.67%, 1.0087 68.52%, 1.008 70.37%, 1.0072 72.22%, 1.0064 74.07%, 1.0057 75.93%, 1.0049 77.78%, 1.0043 79.63%, 1.0037 81.48%, 1.0031 83.33%, 1.0026 85.19%, 1.0022 87.04%, 1.0018 88.89%, 1.0015 90.74%, 1.0012 92.59%, 1.0009 94.44%, 1.0007 96.3%, 1.0005 98.15%, 1);
--ease-cl-spring-press: linear(0, 0.0172 1.52%, 0.0654 3.03%, 0.1391 4.55%, 0.2326 6.06%, 0.3403 7.58%, 0.4568 9.09%, 0.5771 10.61%, 0.6966 12.12%, 0.8114 13.64%, 0.9182 15.15%, 1.0145 16.67%, 1.0982 18.18%, 1.1682 19.7%, 1.2238 21.21%, 1.2649 22.73%, 1.2919 24.24%, 1.3058 25.76%, 1.3076 27.27%, 1.2988 28.79%, 1.281 30.3%, 1.256 31.82%, 1.2255 33.33%, 1.1911 34.85%, 1.1547 36.36%, 1.1175 37.88%, 1.0811 39.39%, 1.0464 40.91%, 1.0145 42.42%, 0.9862 43.94%, 0.9618 45.45%, 0.9417 46.97%, 0.9261 48.48%, 0.915 50%, 0.9081 51.52%, 0.9052 53.03%, 0.9058 54.55%, 0.9095 56.06%, 0.9158 57.58%, 0.9242 59.09%, 0.9341 60.61%, 0.9449 62.12%, 0.9563 63.64%, 0.9677 65.15%, 0.9788 66.67%, 0.9892 68.18%, 0.9987 69.7%, 1.007 71.21%, 1.0141 72.73%, 1.0198 74.24%, 1.0241 75.76%, 1.0271 77.27%, 1.0288 78.79%, 1.0293 80.3%, 1.0287 81.82%, 1.0273 83.33%, 1.0251 84.85%, 1.0224 86.36%, 1.0192 87.88%, 1.0158 89.39%, 1.0123 90.91%, 1.0088 92.42%, 1.0054 93.94%, 1.0023 95.45%, 0.9995 96.97%, 0.997 98.48%, 1);
/* Perceptual surfacing of frosted floating layers. */
--blur-frost: 36px;
}
/* ---------------------------------------------------------------------------
* Control geometry and interaction
* ------------------------------------------------------------------------- */
@theme static {
/* Numeric spacing utilities derive from this shared unit. */
--spacing: 4px;
--container-lg: 32rem;
--spacing-control-sm: 28px;
--spacing-control-md: 36px;
--spacing-control-lg: 44px;
--spacing-icon-sm: 15px;
--spacing-icon-md: 18px;
--spacing-icon-lg: 24px;
--radius-item: 6px;
--text-button: 17px;
--text-button--line-height: 22px;
--text-button--font-weight: 500;
--text-button--letter-spacing: -0.43px;
--cl-press-scale-sm: 1.0714;
--cl-press-scale-md: 1.0556;
--cl-press-scale-lg: 1.0455;
--cl-duration-fast: 140ms;
--cl-duration-surface: 160ms;
--cl-duration-press: 170ms;
--cl-duration-release: 550ms;
--cl-duration-enter: 250ms;
--cl-duration-morph: 380ms;
--cl-duration-exit: 110ms;
--cl-duration-reduced: 125ms;
--cl-duration-tooltip-morph: 180ms;
--cl-duration-tooltip-tail: 60ms;
--cl-duration-tooltip-content-exit: 90ms;
--cl-tooltip-content-scale: 0.98;
--cl-tooltip-content-blur: 5px;
--cl-tooltip-content-offset: 8px;
--cl-tooltip-content-offset-negative: -8px;
--ease-cl-press-in: cubic-bezier(0.25, 1, 0.5, 1);
--cl-focus-width: 2px;
--cl-focus-offset: 2px;
--cl-enter-scale: 0.95;
--cl-spring-overlay-omega: 9.2;
--cl-spring-overlay-zeta: 0.82;
--cl-spring-overlay-sample-duration: 450ms;
--cl-spring-press-mass: 1;
--cl-spring-press-stiffness: 520;
--cl-spring-press-damping: 16;
/*
* The select panel's reveal, read by `lib/reveal.tsx` rather than sampled
* into a `linear()`: that leg is driven per frame in JS, because the shape's
* `clip-path` and its SVG outline have to be regenerated at every size the
* box passes through, and a CSS timing function cannot be read back.
*
* Same physical system as the two above, in the same normalized-progress
* units as `--cl-spring-overlay-*`: `omega` is the undamped frequency over
* the leg, so the seconds live in `--cl-duration-morph`. These values are
* the Flutter select's `SpringDescription(mass: 1, stiffness: 700,
* damping: 30)` on that clock — omega = sqrt(700) * 0.38, zeta =
* 30 / (2 * sqrt(700)) — which overshoots ~11%, far looser than the overlay
* spring. The panel arriving with a visible settle is the point.
*/
--cl-spring-select-omega: 10.05;
--cl-spring-select-zeta: 0.567;
--cl-hover-base-weight: 92%;
--cl-hover-tint: #ffffff;
--cl-select-max-width: 28rem;
/*
* How tall the options list may get: the screen, less the margin the panel
* keeps from its edges and less the panel's own chrome around the list — its
* 6px of padding and the hairline `.cl-frost` draws, top and bottom, so that
* it is the *panel* that fits the screen.
*
* There is deliberately no smaller number here. Flutter's aligned branch is
* `min(panelContentHeight, availableHeight)` and nothing else: a long menu
* grows until it fills the screen. A fixed cap changes what the menu *is* —
* the selected option can no longer be shown with its neighbours around it,
* and the placement has to start trading the row's position against the
* panel's, which is a decision a menu should never have to make. Override
* this token to cap a particular select; the placement handles it.
*/
--cl-select-max-height: calc(
100dvh - var(--cl-select-screen-margin) * 2 - var(--cl-select-panel-padding) * 2 - 2px
);
--cl-select-side-offset: 6px;
/*
* The options panel's own geometry, which does not follow the control size:
* a denser select has shorter rows, not a tighter panel around them. Both are
* the Flutter select's constants (`_panelPadding`, `_panelHorizontalPadding`
* and the option row's own `EdgeInsets.symmetric(horizontal: 10)`).
*/
--cl-select-panel-padding: 6px;
--cl-select-row-padding: 10px;
/*
* The trigger's stacked chevrons. Taller than wide, and not on the icon ramp:
* the two heads need vertical room between them and none at the sides, so the
* glyph is its own box rather than a square that happens to contain it.
*/
/* The closest the options panel comes to the edge of the viewport. */
--cl-select-screen-margin: 8px;
/*
* How far the options list dissolves at its top and bottom. Shorter than the
* scroll area's own 24px, because the band is measured against a row: at 24 a
* 28px row at the edge is fading across almost its whole height and reads as
* disabled rather than as clipped. Flutter's select makes the same reduction
* against `CLList`'s identical default.
*/
--cl-select-scroll-edge: 16px;
--cl-select-chevrons-width: 9px;
--cl-select-chevrons-height: 14px;
/*
* Scroll area.
*
* `edge` is how far a side fades over; `blur` is the Gaussian sigma that
* fade reaches at the very edge. Setting one side's edge to zero removes
* both the fade and the blur there, so the four sides are independently
* switchable without a prop.
*
* The sides are logical, because the overflow state they follow is: in a
* vertical LTR area `block-start` is the top and `block-end` the bottom, and
* an RTL area needs no overrides at all.
*/
--cl-scroll-edge: 24px;
--cl-scroll-edge-block-start: var(--cl-scroll-edge);
--cl-scroll-edge-block-end: var(--cl-scroll-edge);
--cl-scroll-edge-inline-start: var(--cl-scroll-edge);
--cl-scroll-edge-inline-end: var(--cl-scroll-edge);
--cl-scroll-blur: 5px;
/*
* The three-layer ramp that stands in for the continuously varying sigma a
* shader would use: each layer reaches half as far into the band as the one
* before it and blurs half as hard, so strength falls off geometrically from
* the very edge. The strongest layer is `--cl-scroll-blur` over the full
* band, so it needs no multiplier of its own.
*/
--cl-scroll-blur-mid: 0.5;
--cl-scroll-blur-far: 0.25;
--cl-scroll-reach-near: 25%;
--cl-scroll-reach-mid: 50%;
/* The thumb is `--cl-selection`; `inset` keeps both tracks clear of a
* surface's own padding, and `margin` shortens the thumb within its track. */
--cl-scrollbar-thickness: 4px;
--cl-scrollbar-margin: 2px;
--cl-scrollbar-inset: 0px;
--cl-scrollbar-fade-delay: 300ms;
--cl-scrollbar-fade-duration: 180ms;
/*
* Anchored overlays (popover, tooltip).
*
* The arrow is not a separate element: it is spliced into the surface's own
* smooth-corner path, so `--cl-arrow-*` are the tail's geometry inside that
* path rather than the size of a box. `extent` is how far the tail reaches
* past the body; `width` is its full base along the body edge.
*
* `gap` is measured from the tail's tip, not the body, so an overlay sits the
* same distance from its anchor whether or not it draws an arrow.
*/
--cl-arrow-extent: 7px;
--cl-arrow-width: 24px;
--cl-anchor-gap: 4px;
--cl-anchor-margin: 8px;
--cl-popover-padding: 12px;
--cl-tooltip-padding-x: 10px;
--cl-tooltip-padding-y: 6px;
--cl-tooltip-delay: 450ms;
--cl-tooltip-close-delay: 50ms;
/* Reopening another tooltip within this window skips the dwell entirely. */
--cl-tooltip-grace: 500ms;
/*
* The numeric field's stepper and its scrub readout.
*
* The strip is wider than the chevrons it holds: the buttons sit against the
* value, and the remainder is the field's trailing inset, which keeps the
* chevrons off the rounded corner. One chevron button is `step-width` across
* the strip and `step-height` along it, so two of them stack inside it — and
* a horizontal stepper swaps the pair rather than needing its own sizes.
*
* The readout's padding is its own rather than the popover's: it holds one
* number at display size, so it is inset further than a surface of prose.
*/
--cl-number-stepper-width: 24px;
--cl-number-step-width: 18px;
--cl-number-step-height: 10px;
--cl-number-readout-padding-x: 16px;
--cl-number-readout-padding-y: 10px;
/*
* The progress bar.
*
* Thickness is a doubling ladder rather than the control heights: a progress
* bar is a line, not a box, so the three steps are the hairline under a
* toolbar, the default row, and the bar a sheet gives a line of its own.
*
* `gap` is the distance the track keeps from the active indicator, which is
* what makes the rail read as two pieces rather than one bar filling up. It
* collapses on its own as either end runs out of room — see `progress.css`
* — so it needs no second, smaller value for the ends of the range.
*
* `extent` is the whole of the rail, and it is a token because every position
* in the component is a fraction of it: the segments are laid out as
* `fraction * extent`, which is the same arithmetic the design's indicator
* does over a canvas width. It is also what caps a segment's fill at the
* rail's own thickness, so a short segment stays round.
*
* The cycle is the one duration in ClaraLight that is not quick. It is not a
* transition: an indeterminate bar is a loop that has to read as unhurried
* work rather than as something repeatedly failing and restarting.
*/
--spacing-progress-sm: 2px;
--spacing-progress-md: 4px;
--spacing-progress-lg: 8px;
--cl-progress-gap: 4px;
--cl-progress-extent: 100%;
--cl-duration-progress: 1750ms;
/*
* The circular indicator.
*
* Sized by the stroke's centre line rather than by its box, because that is
* the circle everything else is measured along: `radius` is that line and
* `cap` is how far a round cap reaches either side of it — half the stroke,
* and also the radius of the dot a vanishing arc collapses to. The box is
* `radius * 2 + stroke`, so these three pairs are 16, 24 and 40px rings with
* 2, 3 and 4px strokes: one that sits in a line of text, one that sits in a
* row, and one that stands alone.
*/
--cl-progress-ring-radius-sm: 7px;
--cl-progress-ring-cap-sm: 1px;
--cl-progress-ring-radius-md: 10.5px;
--cl-progress-ring-cap-md: 1.5px;
--cl-progress-ring-radius-lg: 18px;
--cl-progress-ring-cap-lg: 2px;
/*
* Twelve o'clock, clockwise. An SVG circle's path starts at three, so this
* is the quarter turn back to where the design starts.
*/
--cl-progress-ring-start: -90deg;
/*
* The indeterminate ring's figure, all of it on one 6s clock.
*
* The arc breathes between these two fractions of the ring while the ring
* itself turns three times — and a fourth turn arrives a quarter at a time,
* each quarter landing in 300ms and then waiting. That wait is the whole
* character of the figure: a spinner that turns at one rate reads as a
* wheel, and one that keeps arriving somewhere reads as work.
*/
--cl-progress-ring-arc-min: 0.1;
--cl-progress-ring-arc-max: 0.87;
--cl-progress-ring-spin: 1080deg;
--cl-progress-ring-step-1: 90deg;
--cl-progress-ring-step-2: 180deg;
--cl-progress-ring-step-3: 270deg;
--cl-progress-ring-step-4: 360deg;
--cl-duration-progress-ring: 6000ms;
}
@theme inline static {
--color-accent-hover: color-mix(
in oklab,
var(--cl-accent) var(--cl-hover-base-weight),
var(--cl-hover-tint)
);
--color-floating-hover: color-mix(
in oklab,
var(--cl-floating) var(--cl-hover-base-weight),
var(--cl-hover-tint)
);
--color-danger-hover: color-mix(
in oklab,
var(--cl-danger) var(--cl-hover-base-weight),
var(--cl-hover-tint)
);
}
/* ---------------------------------------------------------------------------
* Shadow ladder
* ------------------------------------------------------------------------- */
/**
* Two-layer shadows: a wide soft ambient pass and a tight contact pass.
*/
@theme static {
--shadow-frost:
0 16px 48px -12px rgb(0 0 0 / 0.55), 0 2px 8px -2px rgb(0 0 0 / 0.32);
--shadow-panel:
0 8px 32px -8px rgb(0 0 0 / 0.42), 0 1px 3px rgb(0 0 0 / 0.24);
--shadow-dialog:
0 32px 72px -16px rgb(0 0 0 / 0.6), 0 4px 16px -4px rgb(0 0 0 / 0.36);
}
/* ---------------------------------------------------------------------------
* Scheme tokens
* ------------------------------------------------------------------------- */
/**
* `@theme inline` so utilities compile to `var(--cl-*)` and pick up whichever
* scheme is active, instead of being inlined at build time.
*
* `static` keeps every variable in the output even when no utility happens to
* reference it. Tailwind drops unused theme variables by default, which is a
* reasonable default for an app and the wrong one for a design system: these
* names are the public API, and consumers read them at runtime
* (`getComputedStyle(el).getPropertyValue("--radius-sheet")`) or reference them
* from hand-written CSS. A token that silently disappears because the current
* component set does not use it is a break nobody can see.
*/
@theme inline static {
/* --- Layered surface stack --- */
--color-background: var(--cl-background); /* window / canvas */
--color-panel: var(--cl-panel); /* panes, sheets, sidebars */
--color-frost: var(--cl-frost); /* translucent wash under a backdrop blur */
--color-control: var(--cl-control); /* rows, fields, buttons, chips */
--color-control-highlight: var(
--cl-control-highlight
); /* hovered / gently raised */
--color-floating: var(
--cl-floating
); /* dark fill over arbitrary canvas content */
--color-on-floating: var(--cl-on-floating);
--color-selection: var(
--cl-selection
); /* selected row / segment, scrollbar thumb */
--color-track: var(
--cl-track
); /* recessed track behind segmented / slider / switch */
/* --- Lines --- */
--color-separator: var(
--cl-separator
); /* hairline between rows and groups */
--color-outline: var(--cl-outline); /* 1px around controls and dialogs */
--color-outline-strong: var(
--cl-outline-strong
); /* floating panels and sheets */
/* --- Foreground ramp --- */
--color-foreground: var(
--cl-foreground
); /* primary: titles, selected rows */
--color-foreground-secondary: var(
--cl-foreground-secondary
); /* row and body text */
--color-foreground-tertiary: var(
--cl-foreground-tertiary
); /* subtitles, units, prefixes */
--color-foreground-hint: var(
--cl-foreground-hint
); /* section headers, placeholders */
--color-foreground-disabled: var(--cl-foreground-disabled);
/* --- Accent --- */
--color-accent: var(--cl-accent);
--color-accent-background: var(--cl-accent-background);
--color-on-accent: var(--cl-on-accent);
--color-selection-accent: var(--cl-selection-accent);
/* --- Status --- */
--color-success: var(--cl-success);
--color-warning: var(--cl-warning);
--color-warning-background: var(--cl-warning-background);
--color-danger: var(--cl-danger);
--color-danger-background: var(--cl-danger-background);
--color-on-danger: var(--cl-on-danger);
/* --- Scrim --- */
--color-scrim: var(--cl-scrim);
}
/**
* Dark — the default scheme. Explicit `rgb(... / alpha)` keeps translucent
* layers readable and editable.
*/
:root,
.dark {
--cl-background: #191919;
--cl-panel: #111111;
--cl-frost: rgb(22 22 22 / 0.749);
--cl-control: rgb(255 255 255 / 0.102);
--cl-control-highlight: rgb(255 255 255 / 0.149);
--cl-floating: rgb(0 0 0 / 0.608);
--cl-on-floating: #ffffff;
--cl-selection: rgb(255 255 255 / 0.161);
--cl-track: rgb(255 255 255 / 0.102);
--cl-separator: rgb(255 255 255 / 0.102);
--cl-outline: rgb(255 255 255 / 0.149);
--cl-outline-strong: rgb(255 255 255 / 0.302);
--cl-foreground: #ffffff;
--cl-foreground-secondary: rgb(255 255 255 / 0.898);
--cl-foreground-tertiary: rgb(255 255 255 / 0.749);
--cl-foreground-hint: rgb(255 255 255 / 0.4);
--cl-foreground-disabled: rgb(255 255 255 / 0.349);
--cl-accent: #0090ff;
--cl-accent-background: rgb(0 136 246 / 0.325);
--cl-on-accent: #ffffff;
--cl-selection-accent: #3e63dd;
--cl-success: #30d158;
--cl-warning: #ffba18;
--cl-warning-background: rgb(244 209 0 / 0.086);
--cl-danger: #e5484d;
--cl-danger-background: rgb(243 0 13 / 0.078);
--cl-on-danger: #ffffff;
--cl-scrim: rgb(0 0 0 / 0.451);
color-scheme: dark;
}
/**
* Light — a warm scheme: cream paper and near-black with a brown cast,
* rather than neutral grey.
*/
.light {
--cl-background: #f9f6ee;
--cl-panel: #f4f2ea;
--cl-frost: rgb(255 255 255 / 0.612);
--cl-control: rgb(176 160 148 / 0.102);
--cl-control-highlight: rgb(176 160 148 / 0.2);
--cl-floating: rgb(255 255 255 / 0.612);
--cl-on-floating: #160a01;
--cl-selection: rgb(176 160 148 / 0.102);
--cl-track: rgb(176 160 148 / 0.102);
--cl-separator: rgb(22 10 1 / 0.102);
--cl-outline: rgb(22 10 1 / 0.161);
--cl-outline-strong: rgb(22 10 1 / 0.302);
--cl-foreground: #160a01;
/* Secondary text is slightly more opaque than in the dark scheme. */
--cl-foreground-secondary: rgb(22 10 1 / 0.902);
--cl-foreground-tertiary: rgb(22 10 1 / 0.749);
--cl-foreground-hint: rgb(22 10 1 / 0.62);
--cl-foreground-disabled: rgb(22 10 1 / 0.322);
--cl-accent: #0090ff;
--cl-accent-background: rgb(0 144 255 / 0.161);
--cl-on-accent: #ffffff;
--cl-selection-accent: #3e63dd;
--cl-success: #34c759;
--cl-warning: #c7871e;
--cl-warning-background: rgb(244 209 0 / 0.086);
--cl-danger: #e5484d;
--cl-danger-background: rgb(243 0 13 / 0.078);
--cl-on-danger: #ffffff;
--cl-scrim: rgb(0 0 0 / 0.349);
color-scheme: light;
}
/* ---------------------------------------------------------------------------
* Reduced motion
* ------------------------------------------------------------------------- */
/**
* Keep a short fade under reduced motion rather than removing feedback
* entirely, so state changes stay legible.
*/
@media (prefers-reduced-motion: reduce) {
:root {
--ease-cl-spring-overlay: linear(0, 1);
--ease-cl-spring-press: linear(0, 1);
}
*,
::before,
::after {
animation-duration: var(--cl-duration-reduced) !important;
animation-iteration-count: 1 !important;
transition-duration: var(--cl-duration-reduced) !important;
transition-timing-function: var(--ease-cl-out) !important;
scroll-behavior: auto !important;
}
}