@uncinq/design-tokens 0.4.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +122 -53
  2. package/dist/css/primitive/blur.css +14 -0
  3. package/{tokens → dist/css}/primitive/color.css +53 -96
  4. package/dist/css/primitive/font.css +29 -0
  5. package/dist/css/primitive/shadow.css +16 -0
  6. package/{tokens → dist/css}/primitive/size.css +14 -17
  7. package/{tokens → dist/css}/primitive.css +0 -1
  8. package/{tokens → dist/css}/semantic/blur.css +4 -0
  9. package/dist/css/semantic/border.css +14 -0
  10. package/dist/css/semantic/color.css +99 -0
  11. package/dist/css/semantic/focus.css +13 -0
  12. package/dist/css/semantic/form.css +109 -0
  13. package/dist/css/semantic/grid.css +15 -0
  14. package/dist/css/semantic/icon.css +21 -0
  15. package/dist/css/semantic/motion.css +28 -0
  16. package/dist/css/semantic/opacity.css +15 -0
  17. package/dist/css/semantic/radius.css +20 -0
  18. package/dist/css/semantic/ratio.css +18 -0
  19. package/dist/css/semantic/shadow.css +12 -0
  20. package/dist/css/semantic/size.css +14 -0
  21. package/dist/css/semantic/spacing.css +30 -0
  22. package/dist/css/semantic/typography.css +48 -0
  23. package/dist/css/semantic/z-index.css +18 -0
  24. package/{tokens → dist/css}/semantic.css +0 -2
  25. package/package.json +22 -11
  26. package/tokens/primitive/blur.json +24 -0
  27. package/tokens/primitive/color.json +259 -0
  28. package/tokens/primitive/font.json +93 -0
  29. package/tokens/primitive/shadow.json +113 -0
  30. package/tokens/primitive/size.json +196 -0
  31. package/tokens/semantic/blur.json +8 -0
  32. package/tokens/semantic/border.json +28 -0
  33. package/tokens/semantic/color.json +343 -0
  34. package/tokens/semantic/focus.json +22 -0
  35. package/tokens/semantic/form.json +550 -0
  36. package/tokens/semantic/grid.json +28 -0
  37. package/tokens/semantic/icon.json +52 -0
  38. package/tokens/semantic/motion.json +86 -0
  39. package/tokens/semantic/opacity.json +28 -0
  40. package/tokens/semantic/radius.json +48 -0
  41. package/tokens/semantic/ratio.json +40 -0
  42. package/tokens/semantic/shadow.json +18 -0
  43. package/tokens/semantic/size.json +24 -0
  44. package/tokens/semantic/spacing.json +90 -0
  45. package/tokens/semantic/typography.json +174 -0
  46. package/tokens/semantic/z-index.json +40 -0
  47. package/tokens/primitive/blur.css +0 -10
  48. package/tokens/primitive/font.css +0 -32
  49. package/tokens/primitive/opacity.css +0 -12
  50. package/tokens/primitive/shadow.css +0 -16
  51. package/tokens/semantic/border.css +0 -15
  52. package/tokens/semantic/color.css +0 -119
  53. package/tokens/semantic/dark.css +0 -48
  54. package/tokens/semantic/focus.css +0 -10
  55. package/tokens/semantic/form.css +0 -107
  56. package/tokens/semantic/grid.css +0 -39
  57. package/tokens/semantic/icon.css +0 -19
  58. package/tokens/semantic/motion.css +0 -46
  59. package/tokens/semantic/opacity.css +0 -10
  60. package/tokens/semantic/radius.css +0 -19
  61. package/tokens/semantic/ratio.css +0 -23
  62. package/tokens/semantic/shadow.css +0 -14
  63. package/tokens/semantic/size.css +0 -20
  64. package/tokens/semantic/spacing.css +0 -42
  65. package/tokens/semantic/typography.css +0 -78
  66. package/tokens/semantic/z-index.css +0 -14
  67. /package/{tokens → dist/css}/index.css +0 -0
  68. /package/{tokens → dist/css}/semantic/mediaqueries.css +0 -0
@@ -1,119 +0,0 @@
1
- /* semantic/color.css */
2
- /*
3
- * Purposeful color aliases — reference primitives, never raw values.
4
- * Override --color-brand (and optionally --color-*) in your project to rebrand.
5
- *
6
- * Default brand: sienna (mix crimson #a90940 × terracotta, H ≈ 23°).
7
- *
8
- * A11y notes:
9
- * - Status colors (danger, success, info) use 600-level primitives so white
10
- * text meets WCAG AA (4.5:1) when used as button/badge backgrounds.
11
- * - Warning uses amber-500 (inherently bright); --color-text-on-warning is
12
- * dark (gray-900) to maintain contrast.
13
- */
14
- @layer config {
15
- :root {
16
- color-scheme: light;
17
-
18
- /* ── Accent ─────────────────────────────────────────────────────────── */
19
- --color-accent: var(--color-sienna-600);
20
- --color-accent-muted: var(--color-sienna-100);
21
- --color-accent-hover: var(--color-sienna-700);
22
- --color-accent-strong: var(--color-sienna-900);
23
-
24
- /* ── Brand ─────────────────────────────────────────────────────────── */
25
- --color-brand: var(--color-sienna-600);
26
- --color-brand-muted: var(--color-sienna-100);
27
- --color-brand-hover: var(--color-sienna-700);
28
- --color-brand-strong: var(--color-sienna-900);
29
-
30
- /* ── Overlay ───────────────────────────────────────────────────────── */
31
- --color-backdrop: rgb(var(--color-black-rgb) / var(--opacity-backdrop));
32
-
33
- /* ── Backgrounds ───────────────────────────────────────────────────── */
34
- --color-bg: var(--color-white);
35
- --color-bg-accent: var(--color-accent);
36
- --color-bg-media: var(--color-gray-200);
37
- --color-bg-muted: var(--color-gray-100);
38
- --color-bg-muted-hover: var(--color-gray-200);
39
- --color-bg-surface: var(--color-bg);
40
-
41
- /* ── Borders & focus ───────────────────────────────────────────────── */
42
- --color-border: var(--color-gray-200);
43
- --color-border-hover: var(--color-gray-500);
44
- --color-focus: var(--color-text);
45
-
46
- /* ── Shadows ───────────────────────────────────────────────────────── */
47
- /* --color-shadow holds raw RGB channels so rgb(var(--color-shadow) / α) works. */
48
- /* In dark mode, flip to 255 255 255 → all shadows become a white glow. */
49
- --color-shadow: var(--color-black-rgb);
50
- --color-shadow-light: rgb(var(--color-shadow) / var(--opacity-shadow)); /* sm, center-* */
51
- --color-shadow-normal: rgb(var(--color-shadow) / var(--opacity-shadow)); /* md, lg */
52
-
53
- /* ── Text ──────────────────────────────────────────────────────────── */
54
- --color-active: var(--color-accent);
55
- --color-credit: var(--color-text-muted);
56
- --color-heading: var(--color-black);
57
- --color-link: var(--color-text);
58
- --color-link-active: var(--color-active);
59
- --color-link-hover: var(--color-accent);
60
- --color-text: var(--color-gray-900);
61
- --color-text-hover: var(--color-gray-700);
62
- --color-text-muted: var(--color-gray-500);
63
- --color-text-disabled: var(--color-gray-300);
64
- --color-text-on-accent: var(--color-white);
65
- --color-text-on-brand: var(--color-white);
66
- --color-text-on-danger: var(--color-white);
67
- --color-text-on-dark: var(--color-white);
68
- --color-text-on-info: var(--color-white);
69
- --color-text-on-light: var(--color-gray-900);
70
- --color-text-on-primary: var(--color-white);
71
- --color-text-on-secondary: var(--color-white);
72
- --color-text-on-surface: var(--color-text);
73
- --color-text-on-success: var(--color-white);
74
- --color-text-on-warning: var(--color-gray-900); /* amber is bright — dark text */
75
-
76
- /* ── Semantic variants ─────────────────────────────────────────────── */
77
-
78
- /* Primary (alias of brand) */
79
- --color-primary: var(--color-brand);
80
- --color-primary-muted: var(--color-brand-muted);
81
- --color-primary-hover: var(--color-brand-hover);
82
- --color-primary-strong: var(--color-brand-strong);
83
-
84
- /* Secondary */
85
- --color-secondary: var(--color-gray-600);
86
- --color-secondary-muted: var(--color-gray-100);
87
- --color-secondary-strong: var(--color-gray-800);
88
-
89
- /* Danger — red-600 ensures white text meets WCAG AA */
90
- --color-danger: var(--color-red-600);
91
- --color-danger-muted: var(--color-red-100);
92
- --color-danger-strong: var(--color-red-800);
93
-
94
- /* Dark */
95
- --color-dark: var(--color-gray-900);
96
- --color-dark-muted: var(--color-gray-100);
97
- --color-dark-strong: var(--color-black);
98
-
99
- /* Info — blue-600 ensures white text meets WCAG AA */
100
- --color-info: var(--color-blue-600);
101
- --color-info-muted: var(--color-blue-100);
102
- --color-info-strong: var(--color-blue-800);
103
-
104
- /* Light */
105
- --color-light: var(--color-gray-200);
106
- --color-light-muted: var(--color-gray-100);
107
- --color-light-strong: var(--color-gray-700);
108
-
109
- /* Success — green-600 ensures white text meets WCAG AA */
110
- --color-success: var(--color-green-600);
111
- --color-success-muted: var(--color-green-100);
112
- --color-success-strong: var(--color-green-800);
113
-
114
- /* Warning — amber-500 is bright; pair with dark text (see text-on-warning above) */
115
- --color-warning: var(--color-amber-500);
116
- --color-warning-muted: var(--color-amber-100);
117
- --color-warning-strong: var(--color-amber-700);
118
- }
119
- }
@@ -1,48 +0,0 @@
1
- /* semantic/dark.css */
2
- /*
3
- * Dark mode token overrides — activated by OS preference.
4
- * Projects without dark mode: add `color-scheme: only light` in @layer config.
5
- * Manual toggle ([data-theme]): handled at project level.
6
- *
7
- * Tokens that adapt automatically (reference semantic tokens that change here):
8
- * --color-bg-surface → var(--color-bg)
9
- * --color-link → var(--color-text)
10
- * --form-color-border → var(--color-border)
11
- * --form-color-text → var(--color-text)
12
- * --input-color-bg → var(--form-color-bg)
13
- *
14
- * Not changed: brand, status (danger/success/info/warning), secondary, dark,
15
- * light — functional colors that stay consistent in dark mode.
16
- * Override at project level if needed.
17
- */
18
- @layer config {
19
- @media (prefers-color-scheme: dark) {
20
- :root:not([data-color-scheme="light"]) {
21
- color-scheme: dark;
22
-
23
- /* ── Backgrounds ─────────────────────────────────────────────────── */
24
- --color-bg: var(--color-gray-950);
25
- --color-bg-muted: var(--color-gray-900);
26
- --color-bg-muted-hover: var(--color-gray-800);
27
- --color-bg-media: var(--color-gray-800);
28
-
29
- /* ── Borders ─────────────────────────────────────────────────────── */
30
- --color-border: var(--color-gray-800);
31
-
32
- /* ── Text ────────────────────────────────────────────────────────── */
33
- --color-heading: var(--color-white);
34
- --color-text: var(--color-gray-200);
35
- --color-text-muted: var(--color-gray-400);
36
- --color-text-disabled: var(--color-gray-600);
37
- --color-text-hover: var(--color-gray-300);
38
-
39
- /* ── Forms ───────────────────────────────────────────────────────── */
40
- /* --form-color-bg references --color-white directly — must be explicit */
41
- --form-color-bg: var(--color-gray-900);
42
-
43
- /* ── Shadows ─────────────────────────────────────────────────────── */
44
- /* Flip to white → all shadows become a subtle white glow */
45
- --color-shadow: var(--color-white-rgb);
46
- }
47
- }
48
- }
@@ -1,10 +0,0 @@
1
- /* semantic/focus.css */
2
- @layer config {
3
- :root {
4
- --focus: var(--focus-outline-width) var(--focus-outline-style) var(--focus-color);
5
- --focus-color: var(--color-focus);
6
- --focus-outline-style: solid;
7
- --focus-outline-width: 1px;
8
- --focus-outline-offset: 2px;
9
- }
10
- }
@@ -1,107 +0,0 @@
1
- /* semantic/form.css */
2
- @layer config {
3
- :root {
4
- /* ── Base form ─────────────────────────────────────────────────────── */
5
- --form-border-radius: var(--radius-xs);
6
- --form-border-width: var(--border-width-normal);
7
- --form-color-accent: var(--color-black);
8
- --form-color-bg: var(--color-white);
9
- --form-color-border: var(--color-border);
10
- --form-color-border-hover: var(--color-border-hover);
11
- --form-color-text: var(--color-text);
12
- --form-padding: var(--spacing-control);
13
- --form-shadow: var(--shadow-control);
14
- --form-shadow-hover: var(--shadow-control-hover);
15
- --form-transition: var(--transition-normal);
16
-
17
- /* ── Input ─────────────────────────────────────────────────────────── */
18
- --input-border-radius: var(--form-border-radius);
19
- --input-border-width: var(--form-border-width);
20
- --input-color-bg: var(--form-color-bg);
21
- --input-color-border: var(--form-color-border);
22
- --input-color-border-hover: var(--form-color-border-hover);
23
- --input-color-placeholder: var(--color-text-muted);
24
- --input-color-text: var(--form-color-text);
25
- --input-padding: var(--form-padding);
26
-
27
- /* ── File button ───────────────────────────────────────────────────── */
28
- --file-button-margin-end: var(--spacing-12);
29
- --file-button-padding: var(--spacing-8) var(--spacing-12);
30
-
31
- /* ── Textarea ──────────────────────────────────────────────────────── */
32
- --textarea-border-radius: var(--form-border-radius);
33
- --textarea-border-width: var(--form-border-width);
34
- --textarea-color-bg: var(--form-color-bg);
35
- --textarea-color-border: var(--form-color-border);
36
- --textarea-color-border-hover: var(--form-color-border-hover);
37
- --textarea-color-placeholder: var(--color-text-muted);
38
- --textarea-color-text: var(--form-color-text);
39
- --textarea-min-height: 5lh;
40
- --textarea-padding: var(--form-padding);
41
-
42
- /* ── Select ────────────────────────────────────────────────────────── */
43
- --select-border-radius: var(--form-border-radius);
44
- --select-border-width: var(--form-border-width);
45
- --select-color-bg: var(--form-color-bg);
46
- --select-color-border: var(--form-color-border);
47
- --select-color-border-hover: var(--form-color-border-hover);
48
- --select-color-optgroup: var(--color-text-muted);
49
- --select-color-text: var(--form-color-text);
50
- --select-icon: var(--icon-chevron);
51
- --select-icon-size: var(--icon-size);
52
- --select-padding: var(--form-padding);
53
- --select-padding-end: 2rem;
54
-
55
- /* ── Label ─────────────────────────────────────────────────────────── */
56
- --label-color-text: var(--form-color-text);
57
- --label-font-size: var(--font-size-xs);
58
- --label-font-weight: var(--font-weight-medium);
59
- --label-padding: var(--spacing-2xs) 0;
60
- --label-text-transform: uppercase;
61
-
62
- /* ── Help text ─────────────────────────────────────────────────────── */
63
- --help-color-text: var(--color-text-muted);
64
- --help-font-size: var(--font-size-xs);
65
- --help-font-weight: var(--font-weight-normal);
66
- --help-margin: 0;
67
-
68
- /* ── Checkables (checkbox + radio shared) ──────────────────────────── */
69
- --checkable-color: var(--form-color-accent);
70
- --checkable-size: 1.25em;
71
-
72
- /* ── Checkbox ──────────────────────────────────────────────────────── */
73
- --checkbox-border-radius: 0;
74
- --checkbox-border-width: var(--form-border-width);
75
- --checkbox-color-bg: var(--form-color-bg);
76
- --checkbox-color-bg-checked: var(--form-color-bg);
77
- --checkbox-color-bg-hover: var(--form-color-bg);
78
- --checkbox-color-border: var(--form-color-border);
79
- --checkbox-color-border-checked: var(--checkable-color);
80
- --checkbox-color-border-hover: var(--form-color-border-hover);
81
- --checkbox-label-padding: 0 0 0 .3125rem;
82
- --checkbox-mask-checked: var(--icon-tick) center no-repeat;
83
- --checkbox-mask-indeterminate: var(--icon-dash) center no-repeat;
84
- --checkbox-scale-checked: 0.7;
85
-
86
- /* ── Radio ─────────────────────────────────────────────────────────── */
87
- --radio-border-radius: var(--radius-pill);
88
- --radio-border-width: var(--form-border-width);
89
- --radio-border-width-checked: var(--border-width-large);
90
- --radio-color-bg: var(--form-color-bg);
91
- --radio-color-bg-checked: var(--checkable-color);
92
- --radio-color-bg-hover: var(--form-color-bg);
93
- --radio-color-border: var(--form-color-border);
94
- --radio-color-border-checked: var(--checkable-color);
95
- --radio-color-border-hover: var(--form-color-border-hover);
96
- --radio-label-padding: 0 0 0 .3125rem;
97
- --radio-scale-checked: 0.5;
98
-
99
- /* ── Range ─────────────────────────────────────────────────────────── */
100
- --range-thumb-color: var(--form-color-accent);
101
- --range-thumb-color-border: var(--color-white);
102
- --range-thumb-border-width: var(--size-4);
103
- --range-thumb-size: var(--size-24);
104
- --range-track-color: var(--form-color-border);
105
- --range-track-height: calc(var(--border-width-normal) + 2px);
106
- }
107
- }
@@ -1,39 +0,0 @@
1
- /* semantic/grid.css */
2
- @layer config {
3
- :root {
4
- /* ── Grid base ──────────────────────────────────────────────────────── */
5
- --columns: 12;
6
- --gap: var(--spacing-md);
7
-
8
- /* ── Grid column spans ──────────────────────────────────────────────── */
9
- /* Integer spans — grid-agnostic. Comments show col-12 / col-24 fractions. */
10
- --span-full: span var(--columns);
11
- --span-half: span calc(var(--columns) / 2);
12
- --span-quarter: span calc(var(--columns) / 4);
13
- --span-third: span calc(var(--columns) / 3);
14
- --span-24: span 24;
15
- --span-23: span 23;
16
- --span-22: span 22;
17
- --span-21: span 21;
18
- --span-20: span 20;
19
- --span-19: span 19;
20
- --span-18: span 18;
21
- --span-17: span 17;
22
- --span-16: span 16;
23
- --span-15: span 15;
24
- --span-14: span 14;
25
- --span-13: span 13;
26
- --span-12: span 12;
27
- --span-11: span 11;
28
- --span-10: span 10;
29
- --span-9: span 9;
30
- --span-8: span 8;
31
- --span-7: span 7;
32
- --span-6: span 6;
33
- --span-5: span 5;
34
- --span-4: span 4;
35
- --span-3: span 3;
36
- --span-2: span 2;
37
- --span-1: span 1;
38
- }
39
- }
@@ -1,19 +0,0 @@
1
- /* semantic/icon.css */
2
- @layer config {
3
- :root {
4
- --icon-size: var(--size-16);
5
-
6
- /* Icons */
7
- --icon-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><line x1="2" y1="8" x2="12" y2="8"/><polyline points="8 4 12 8 8 12"/></svg>');
8
- --icon-arrow-skip: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><line x1="2" y1="8" x2="10" y2="8"/><polyline points="6 4 10 8 6 12"/><line x1="14" y1="3" x2="14" y2="13"/></svg>');
9
- --icon-chevron: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><polyline points="2 5 8 11 14 5"/></svg>');
10
- --icon-close: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round"><line x1="3" y1="3" x2="13" y2="13"/><line x1="13" y1="3" x2="3" y2="13"/></svg>');
11
- --icon-dash: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512"><path d="M431 256c0 17.7-14.3 32-32 32H49c-17.7 0-32-14.3-32-32s14.3-32 32-32h350c17.7 0 32 14.3 32 32z"/></svg>');
12
- --icon-filter: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M1.3 3.3h13.4"/><path d="M4 8h8"/><path d="M6 12.7h4"/></svg>');
13
- --icon-menu: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round"><line x1="2" y1="4" x2="14" y2="4"/><line x1="2" y1="8" x2="14" y2="8"/><line x1="2" y1="12" x2="14" y2="12"/></svg>');
14
- --icon-plus: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round"><line x1="8" y1="3" x2="8" y2="13"/><line x1="3" y1="8" x2="13" y2="8"/></svg>');
15
- --icon-share: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.3v8.7"/><path d="m10.7 4-2.7-2.7-2.7 2.7"/><path d="M2.7 8v5.3a1.3 1.3 0 0 0 1.3 1.3h8a1.3 1.3 0 0 0 1.3-1.3v-5.3"/></svg>');
16
- --icon-tick: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512"><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>');
17
- --icon-toc: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="%23000000" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M10.7 3.3H2"/><path d="M10.7 8H2"/><path d="M10.7 12.7H2"/><path d="M14 3.3h.01"/><path d="M14 8h.01"/><path d="M14 12.7h.01"/></svg>');
18
- }
19
- }
@@ -1,46 +0,0 @@
1
- /* semantic/motion.css */
2
- @layer config {
3
- :root {
4
- /* ── Duration ───────────────────────────────────────────────────────── */
5
- --duration-fast: 150ms;
6
- --duration-normal: 300ms;
7
- --duration-slow: 600ms;
8
-
9
- /* ── Easing — standard ──────────────────────────────────────────────── */
10
- --easing-linear: linear;
11
- --easing-default: ease-in-out;
12
- --easing-in: ease-in;
13
- --easing-out: ease-out;
14
-
15
- /* ── Easing — expressive ─────────────────────────────────────────────── */
16
- /* Fast deceleration, natural feel — good for elements entering the screen */
17
- --easing-out-circ: cubic-bezier(0, 0.55, 0.45, 1);
18
- /* Dramatic deceleration — good for modals, drawers */
19
- --easing-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
20
- /* Slight overshoot then settle — good for confirmations, badges */
21
- --easing-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
22
- /* Bounce — ease-out-quart curve */
23
- --easing-bounce: cubic-bezier(0.165, 0.84, 0.44, 1);
24
-
25
- /* ── Easing — physics (requires modern browser linear() support) ─────── */
26
- /* Spring — overshoots slightly, settles naturally */
27
- --easing-spring: linear(
28
- 0, 0.006, 0.025 2.8%, 0.101, 0.197, 0.325, 0.474, 0.638, 0.806,
29
- 0.962, 1.065, 1.12, 1.14, 1.12 30.9%, 1.034, 0.997, 0.986, 0.998, 1
30
- );
31
-
32
- /* ── Blur ───────────────────────────────────────────────────────────── */
33
- --blur-overlay: 4px;
34
-
35
- /* ── Transition shorthands ──────────────────────────────────────────── */
36
- --transition-fast: all var(--duration-fast) var(--easing-default);
37
- --transition-normal: all var(--duration-normal) var(--easing-default);
38
- --transition-slow: all var(--duration-slow) var(--easing-default);
39
- /* Targeted transitions — prefer over `all` for performance */
40
- --transition-opacity: opacity var(--duration-normal) var(--easing-default);
41
- --transition-transform: transform var(--duration-normal) var(--easing-default);
42
- /* Targeted color transitions */
43
- --transition-property-color: color, background-color, border-color, outline-color, fill, stroke, text-decoration;
44
- --transition-color: var(--transition-property-color) var(--duration-normal) var(--easing-default);
45
- }
46
- }
@@ -1,10 +0,0 @@
1
- /* semantic/opacity.css */
2
- @layer config {
3
- :root {
4
- --opacity-backdrop: var(--opacity-50);
5
- --opacity-disabled: var(--opacity-50);
6
- --opacity-overlay: var(--opacity-75);
7
- --opacity-shadow: var(--opacity-10);
8
- --opacity-subtle: var(--opacity-25);
9
- }
10
- }
@@ -1,19 +0,0 @@
1
- /* semantic/radius.css */
2
- @layer config {
3
- :root {
4
- /* ── T-shirt scale ──────────────────────────────────────────────────── */
5
- --radius-2xs: var(--size-2);
6
- --radius-xs: var(--size-4);
7
- --radius-sm: var(--size-8);
8
- --radius-md: var(--size-12);
9
- --radius-lg: var(--size-16);
10
- --radius-xl: var(--size-24);
11
- --radius-2xl: var(--size-32);
12
-
13
- /* ── Purposeful aliases ─────────────────────────────────────────────── */
14
- --radius-none: 0; /* no rounding — sharp edges */
15
- --radius-control: var(--radius-sm); /* button, input, select */
16
- --radius-surface: var(--radius-md); /* card, modal, panel */
17
- --radius-pill: 9999px; /* badge, tag, avatar */
18
- }
19
- }
@@ -1,23 +0,0 @@
1
- /* semantic/ratio.css */
2
- @layer config {
3
- :root {
4
- /* Generic ratios */
5
- --ratio-1-1: 1 / 1;
6
- --ratio-2-3: 2 / 3;
7
- --ratio-3-2: 3 / 2;
8
- --ratio-3-4: 3 / 4;
9
- --ratio-4-3: 4 / 3;
10
- --ratio-9-16: 9 / 16;
11
- --ratio-16-9: 16 / 9;
12
- --ratio-21-9: 21 / 9;
13
-
14
- /* Specific ratios */
15
- --ratio-banner: 21 / 9;
16
- --ratio-cinema: 21 / 9;
17
- --ratio-hero: 4 / 1;
18
- --ratio-portrait: 4 / 5;
19
- --ratio-square: 1 / 1;
20
- --ratio-story: 9 / 16;
21
- --ratio-video: 16 / 9;
22
- }
23
- }
@@ -1,14 +0,0 @@
1
- /* semantic/shadow.css */
2
- /*
3
- * Semantic shadow aliases — map primitive shadows to purposeful roles.
4
- * Override in @layer config to restyle elevation system-wide.
5
- * In dark mode (semantic/dark.css), --shadow-sm/md/lg are overridden with
6
- * higher opacity — these aliases adapt automatically.
7
- */
8
- @layer config {
9
- :root {
10
- --shadow-control: none;
11
- --shadow-control-hover: none;
12
- --shadow-surface: var(--shadow-sm);
13
- }
14
- }
@@ -1,20 +0,0 @@
1
- /* semantic/size.css */
2
- @layer config {
3
- :root {
4
- /* ── Breakpoints ────────────────────────────────────────────────────── */
5
- --size-tablet: var(--size-768); /* 48rem — 768px */
6
- --size-tablet-wide: var(--size-1024); /* 64rem — 1024px */
7
- --size-laptop: var(--size-1440); /* 90rem — 1440px */
8
- --size-desktop: var(--size-1600); /* 100rem — 1600px */
9
- --size-desktop-wide: var(--size-1920); /* 120rem — 1920px */
10
-
11
- /* ── T-shirt scale ──────────────────────────────────────────────────── */
12
- --size-2xs: var(--size-5);
13
- --size-xs: var(--size-10);
14
- --size-sm: var(--size-20);
15
- --size-md: var(--size-40);
16
- --size-lg: var(--size-60);
17
- --size-xl: var(--size-80);
18
- --size-2xl: var(--size-100);
19
- }
20
- }
@@ -1,42 +0,0 @@
1
- /* semantic/spacing.css */
2
- @layer config {
3
- :root {
4
-
5
- /* ── T-shirt scale ──────────────────────────────────────────────────── */
6
- --spacing-2xs: var(--size-5);
7
- --spacing-xs: var(--size-10);
8
- --spacing-sm: var(--size-20);
9
- --spacing-md: var(--size-30);
10
- --spacing-lg: var(--size-40);
11
- --spacing-xl: var(--size-60);
12
- --spacing-2xl: var(--size-100);
13
- --spacing-3xl: var(--size-150);
14
-
15
- /* ── Fluid spacing scale ────────────────────────────────────────────── */
16
- /*
17
- * Fluid spacing using the Utopia method — https://utopia.fyi
18
- *
19
- * Each value is a clamp(min, intercept + slope×vw, max) expression where
20
- * intercept and slope are calculated so the spacing equals exactly `min`
21
- * at a 360px viewport and exactly `max` at a 1440px viewport.
22
- *
23
- * slope = (max_px − min_px) / (1440 − 360)
24
- * intercept = min_px − slope × 360 (converted to rem)
25
- */
26
- --spacing-fluid-2xs: clamp(0.3125rem, 0.2083rem + 0.4630vw, 0.625rem); /* 5 → 10px */
27
- --spacing-fluid-xs: clamp(0.625rem, 0.4167rem + 0.9259vw, 1.25rem); /* 10 → 20px */
28
- --spacing-fluid-sm: clamp(1.25rem, 0.8333rem + 1.8519vw, 2.5rem); /* 20 → 40px */
29
- --spacing-fluid-md: clamp(1.875rem, 1.25rem + 2.7778vw, 3.75rem); /* 30 → 60px */
30
- --spacing-fluid-lg: clamp(2.5rem, 1.6667rem + 3.7037vw, 5rem); /* 40 → 80px */
31
- --spacing-fluid-xl: clamp(3.125rem, 2.0833rem + 4.6296vw, 6.25rem); /* 50 → 100px */
32
- --spacing-fluid-2xl: clamp(3.75rem, 2.5rem + 5.5556vw, 7.5rem); /* 60 → 120px */
33
-
34
- /* ── Purposeful aliases ─────────────────────────────────────────────── */
35
- --spacing-card: var(--spacing-sm); /* padding inside surfaces (card) */
36
- --spacing-control: var(--spacing-xs); /* padding inside interactive controls */
37
- --spacing-heading: var(--spacing-fluid-sm); /* gap below headings */
38
- --spacing-section: var(--spacing-fluid-2xl); /* vertical rhythm between sections */
39
- --spacing-surface: var(--spacing-fluid-sm); /* padding inside surfaces (panel) */
40
- --spacing-typography: var(--spacing-fluid-xs); /* gap between typographic elements */
41
- }
42
- }
@@ -1,78 +0,0 @@
1
- /* semantic/typography.css */
2
- @layer config {
3
- :root {
4
- /* ── Font families ──────────────────────────────────────────────────── */
5
- --font-family-code: var(--font-family-mono);
6
- --font-family-heading: var(--font-family-sans);
7
- --font-family-text: var(--font-family-sans);
8
-
9
- /* ── Font weights ───────────────────────────────────────────────────── */
10
- --font-weight-control: var(--font-weight-medium);
11
- --font-weight-heading: var(--font-weight-bold);
12
- --font-weight-text: var(--font-weight-normal);
13
-
14
- /* ── Letter spacing ─────────────────────────────────────────────────── */
15
- --letter-spacing-normal: 0;
16
- --letter-spacing-medium: 0.025em;
17
- --letter-spacing-large: 0.05em;
18
-
19
- /* ── Line heights ───────────────────────────────────────────────────── */
20
- --line-height-heading: var(--line-height-tight);
21
- --line-height-text: var(--line-height-normal);
22
-
23
- /* ── Font size scale (T-shirt) ──────────────────────────────────────── */
24
- --font-size-2xs: var(--size-12);
25
- --font-size-xs: var(--size-14);
26
- --font-size-sm: var(--size-16);
27
- --font-size-md: var(--size-18);
28
- --font-size-lg: var(--size-24);
29
- --font-size-xl: var(--size-48);
30
- --font-size-2xl: var(--size-64);
31
- --font-size-display: var(--size-96);
32
-
33
- /* ── Fluid font sizes ───────────────────────────────────────────────── */
34
- /*
35
- * Fluid typography using the Utopia method — https://utopia.fyi
36
- *
37
- * Each value is a clamp(min, intercept + slope×vw, max) expression where
38
- * intercept and slope are calculated so the font size equals exactly `min`
39
- * at a 320px viewport and exactly `max` at a 1440px viewport, with a
40
- * perfectly linear scale in between.
41
- *
42
- * slope = (max_px − min_px) / (1440 − 320)
43
- * intercept = min_px − slope × 320 (converted to rem)
44
- *
45
- * Use these instead of fixed T-shirt sizes wherever you want type to
46
- * scale continuously with the viewport, without breakpoints.
47
- */
48
- --font-size-fluid-2xs: clamp(0.625rem, 0.5893rem + 0.1786vw, 0.75rem); /* 10 → 12px */
49
- --font-size-fluid-xs: clamp(0.75rem, 0.7143rem + 0.1786vw, 0.875rem); /* 12 → 14px */
50
- --font-size-fluid-sm: clamp(0.875rem, 0.8393rem + 0.1786vw, 1rem); /* 14 → 16px */
51
- --font-size-fluid-md: clamp(1rem, 0.9643rem + 0.1786vw, 1.125rem); /* 16 → 18px */
52
- --font-size-fluid-lg: clamp(1.125rem, 1.0179rem + 0.5357vw, 1.5rem); /* 18 → 24px */
53
- --font-size-fluid-xl: clamp(1.5rem, 1.0714rem + 2.1429vw, 3rem); /* 24 → 48px */
54
- --font-size-fluid-2xl: clamp(3rem, 2.7143rem + 1.4286vw, 4rem); /* 48 → 64px */
55
- --font-size-fluid-display: clamp(4rem, 3.4286rem + 2.8571vw, 6rem); /* 64 → 96px */
56
-
57
- /* ── Body ───────────────────────────────────────────────────────────── */
58
- --font-size-text: var(--font-size-fluid-md);
59
- --font-size-small: var(--font-size-fluid-sm);
60
-
61
- /* ── Headings ───────────────────────────────────────────────────────── */
62
- --font-size-heading-01: var(--font-size-fluid-xl);
63
- --font-size-heading-02: var(--font-size-fluid-lg);
64
- --font-size-heading-03: var(--font-size-fluid-md);
65
- --font-size-heading-04: var(--font-size-fluid-sm);
66
- --font-size-heading-05: var(--font-size-fluid-sm);
67
- --font-size-heading-06: var(--font-size-fluid-sm);
68
-
69
- /* ── Readability ────────────────────────────────────────────────────── */
70
- /*
71
- * Max line length in ch units (width of "0" character).
72
- * Prevents overly long lines causing reading fatigue (WCAG 1.4.8).
73
- * Headings use a shorter value: larger font = physically wider chars.
74
- */
75
- --max-width-heading: 50ch;
76
- --max-width-paragraph: 70ch;
77
- }
78
- }
@@ -1,14 +0,0 @@
1
- /* semantic/z-index.css */
2
- @layer config {
3
- :root {
4
- --z-index-below: -1; /* background decorative elements */
5
- --z-index-base: 0;
6
- --z-index-raised: 10; /* cards, sticky elements within flow */
7
- --z-index-dropdown: 100; /* dropdowns, popovers */
8
- --z-index-sticky: 200; /* sticky header/sidebar */
9
- --z-index-drawer: 300; /* drawer, side panel */
10
- --z-index-modal: 400; /* modal dialogs */
11
- --z-index-toast: 500; /* notifications, toasts */
12
- --z-index-tooltip: 600; /* tooltips (always on top) */
13
- }
14
- }
File without changes
File without changes