css-tags 0.1.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.
- package/LICENSE +21 -0
- package/README.md +875 -0
- package/carousel.js +86 -0
- package/components/accessibility.css +51 -0
- package/components/actions.css +76 -0
- package/components/alert.css +122 -0
- package/components/application-patterns.css +122 -0
- package/components/badge.css +125 -0
- package/components/box-extra.css +220 -0
- package/components/box.css +75 -0
- package/components/card.css +130 -0
- package/components/carousel.css +76 -0
- package/components/chip.css +71 -0
- package/components/container.css +55 -0
- package/components/content-patterns.css +234 -0
- package/components/disclosure.css +581 -0
- package/components/divider.css +68 -0
- package/components/flex.css +59 -0
- package/components/form-patterns.css +273 -0
- package/components/form.css +130 -0
- package/components/grid.css +82 -0
- package/components/identity.css +59 -0
- package/components/img-container.css +141 -0
- package/components/img-container.js +75 -0
- package/components/list.css +69 -0
- package/components/loading.css +112 -0
- package/components/masonry.css +48 -0
- package/components/modal.css +73 -0
- package/components/navigation-patterns.css +245 -0
- package/components/navigation.css +200 -0
- package/components/popover.css +49 -0
- package/components/site-shell.css +180 -0
- package/components/status.css +110 -0
- package/components/table.css +98 -0
- package/components/tabs.css +103 -0
- package/components/tooltip.css +87 -0
- package/components/tooltips.css +73 -0
- package/components/view-transition.css +73 -0
- package/core/base.css +62 -0
- package/core/defaults.css +490 -0
- package/core/engine.css +32 -0
- package/core/mixins.css +376 -0
- package/core/palette-accent.css +8 -0
- package/core/palette-base.css +107 -0
- package/core/palette-extended.css +142 -0
- package/core/palette-feedback.css +62 -0
- package/core/palette.css +7 -0
- package/core/reset.css +270 -0
- package/core/text.css +171 -0
- package/core/theme.css +608 -0
- package/core/tokens.css +488 -0
- package/core/typography.css +327 -0
- package/index.css +66 -0
- package/layouts/layout-extra.css +204 -0
- package/layouts/layout-extras-helpers.css +19 -0
- package/layouts/layout.css +348 -0
- package/package.json +66 -0
- package/theme-generator.css +979 -0
- package/themes/example-brand.css +59 -0
- package/themes/theme-packs.css +31 -0
- package/types/css-tags.d.ts +482 -0
- package/utilities/utilities.css +564 -0
- package/view-transition.js +111 -0
package/core/mixins.css
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mixins.css
|
|
3
|
+
*
|
|
4
|
+
* A library of reusable CSS Functions and Mixins.
|
|
5
|
+
* ------------------------------------------------------------------------------
|
|
6
|
+
* This file contains a collection of helpful utilities based on the proposed
|
|
7
|
+
* CSS @function and @mixin specification.
|
|
8
|
+
*
|
|
9
|
+
* ==============================================================================
|
|
10
|
+
* ⚠️ IMPORTANT: PROGRESSIVE ENHANCEMENT NOTICE ⚠️
|
|
11
|
+
* Custom @function support is available in Chromium 139+, but is not yet a
|
|
12
|
+
* cross-browser baseline. @mixin remains an actively changing draft feature.
|
|
13
|
+
* Keep standard declarations as fallbacks for production output.
|
|
14
|
+
* ==============================================================================
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* --- FUNCTIONS (return single values) --- */
|
|
18
|
+
|
|
19
|
+
/** @function --rem: Converts pixels to rems. */
|
|
20
|
+
@function --rem(--px type(*), --base type(*): 16) returns type(*) {
|
|
21
|
+
result: calc(var(--px) / var(--base) * 1rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** @function --fluid: Creates a fluid value that scales with the viewport. */
|
|
25
|
+
@function --fluid(
|
|
26
|
+
--min-val type(*),
|
|
27
|
+
--max-val type(*),
|
|
28
|
+
--min-vp type(*): 375px,
|
|
29
|
+
--max-vp type(*): 1280px
|
|
30
|
+
) returns type(*) {
|
|
31
|
+
--slope: calc((var(--max-val) - var(--min-val)) / (var(--max-vp) - var(--min-vp)));
|
|
32
|
+
--intercept: calc(var(--min-val) - var(--slope) * var(--min-vp));
|
|
33
|
+
--preferred-val: calc(var(--slope) * 100vw + var(--intercept));
|
|
34
|
+
result: clamp(var(--min-val), var(--preferred-val), var(--max-val));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** @function --contrast-color: Calculates black or white for best contrast. */
|
|
38
|
+
@function --contrast-color(
|
|
39
|
+
--bg-color type(*),
|
|
40
|
+
--threshold type(*): 0.65
|
|
41
|
+
) returns type(*) {
|
|
42
|
+
--l-result: clamp(0, (l / var(--threshold) - 1) * -infinity, 1);
|
|
43
|
+
result: oklch(from var(--bg-color) var(--l-result) 0 h);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** @function --palette-color: Builds one OKLCH palette stop from token values. */
|
|
47
|
+
@function --palette-color(
|
|
48
|
+
--lightness type(*),
|
|
49
|
+
--chroma type(*),
|
|
50
|
+
--hue type(*)
|
|
51
|
+
) returns type(*) {
|
|
52
|
+
result: oklch(var(--lightness) var(--chroma) var(--hue));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** @function --palette-clamped-color: Builds a gamut-limited OKLCH stop. */
|
|
56
|
+
@function --palette-clamped-color(
|
|
57
|
+
--lightness type(*),
|
|
58
|
+
--chroma type(*),
|
|
59
|
+
--max-chroma type(*),
|
|
60
|
+
--hue type(*)
|
|
61
|
+
) returns type(*) {
|
|
62
|
+
result: oklch(var(--lightness) min(var(--chroma), var(--max-chroma)) var(--hue));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** @function --palette-seed-color: Rebuilds a stop while preserving a seed color's hue. */
|
|
66
|
+
@function --palette-seed-color(
|
|
67
|
+
--seed type(*),
|
|
68
|
+
--lightness type(*),
|
|
69
|
+
--chroma type(*),
|
|
70
|
+
--max-chroma type(*)
|
|
71
|
+
) returns type(*) {
|
|
72
|
+
result: oklch(from var(--seed) var(--lightness) min(var(--chroma), var(--max-chroma)) h);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** @function --palette-alpha: Applies an alpha token without changing OKLCH channels. */
|
|
76
|
+
@function --palette-alpha(--color type(*), --alpha type(*)) returns type(*) {
|
|
77
|
+
result: oklch(from var(--color) l c h / var(--alpha));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @function --palette-mix: Mixes two colors perceptually in OKLCH. */
|
|
81
|
+
@function --palette-mix(
|
|
82
|
+
--from type(*),
|
|
83
|
+
--to type(*),
|
|
84
|
+
--amount type(*): 50%
|
|
85
|
+
) returns type(*) {
|
|
86
|
+
result: color-mix(in oklch, var(--from) calc(100% - var(--amount)), var(--to) var(--amount));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* --- MIXINS (apply blocks of declarations) --- */
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @mixin --palette-scale: Builds generic --palette-step-0..12 output tokens.
|
|
93
|
+
* Set --palette-chroma-0..12 on the target before applying the mixin.
|
|
94
|
+
*/
|
|
95
|
+
@mixin --palette-scale(--hue type(*)) {
|
|
96
|
+
@result {
|
|
97
|
+
--palette-step-0: --palette-color(var(--scale-l-0), var(--palette-chroma-0), var(--hue));
|
|
98
|
+
--palette-step-1: --palette-color(var(--scale-l-1), var(--palette-chroma-1), var(--hue));
|
|
99
|
+
--palette-step-2: --palette-color(var(--scale-l-2), var(--palette-chroma-2), var(--hue));
|
|
100
|
+
--palette-step-3: --palette-color(var(--scale-l-3), var(--palette-chroma-3), var(--hue));
|
|
101
|
+
--palette-step-4: --palette-color(var(--scale-l-4), var(--palette-chroma-4), var(--hue));
|
|
102
|
+
--palette-step-5: --palette-color(var(--scale-l-5), var(--palette-chroma-5), var(--hue));
|
|
103
|
+
--palette-step-6: --palette-color(var(--scale-l-6), var(--palette-chroma-6), var(--hue));
|
|
104
|
+
--palette-step-7: --palette-color(var(--scale-l-7), var(--palette-chroma-7), var(--hue));
|
|
105
|
+
--palette-step-8: --palette-color(var(--scale-l-8), var(--palette-chroma-8), var(--hue));
|
|
106
|
+
--palette-step-9: --palette-color(var(--scale-l-9), var(--palette-chroma-9), var(--hue));
|
|
107
|
+
--palette-step-10: --palette-color(var(--scale-l-10), var(--palette-chroma-10), var(--hue));
|
|
108
|
+
--palette-step-11: --palette-color(var(--scale-l-11), var(--palette-chroma-11), var(--hue));
|
|
109
|
+
--palette-step-12: --palette-color(var(--scale-l-12), var(--palette-chroma-12), var(--hue));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** @mixin --palette-clamped-scale: Generates a complete shared-curve palette from a hue. */
|
|
114
|
+
@mixin --palette-clamped-scale(--hue type(*)) {
|
|
115
|
+
@result {
|
|
116
|
+
--palette-step-0: --palette-clamped-color(var(--scale-l-0), var(--scale-c-1), var(--clamp-max-c-0), var(--hue));
|
|
117
|
+
--palette-step-1: --palette-clamped-color(var(--scale-l-1), var(--scale-c-2), var(--clamp-max-c-0), var(--hue));
|
|
118
|
+
--palette-step-2: --palette-clamped-color(var(--scale-l-2), var(--scale-c-3), var(--clamp-max-c-1), var(--hue));
|
|
119
|
+
--palette-step-3: --palette-clamped-color(var(--scale-l-3), var(--scale-c-4), var(--clamp-max-c-1), var(--hue));
|
|
120
|
+
--palette-step-4: --palette-clamped-color(var(--scale-l-4), var(--scale-c-5), var(--clamp-max-c-2), var(--hue));
|
|
121
|
+
--palette-step-5: --palette-clamped-color(var(--scale-l-5), var(--scale-c-7), var(--clamp-max-c-2), var(--hue));
|
|
122
|
+
--palette-step-6: --palette-clamped-color(var(--scale-l-6), var(--scale-c-8), var(--clamp-max-c-3), var(--hue));
|
|
123
|
+
--palette-step-7: --palette-clamped-color(var(--scale-l-7), var(--scale-c-9), var(--clamp-max-c-3), var(--hue));
|
|
124
|
+
--palette-step-8: --palette-clamped-color(var(--scale-l-8), var(--scale-c-8), var(--clamp-max-c-4), var(--hue));
|
|
125
|
+
--palette-step-9: --palette-clamped-color(var(--scale-l-9), var(--scale-c-7), var(--clamp-max-c-4), var(--hue));
|
|
126
|
+
--palette-step-10: --palette-clamped-color(var(--scale-l-10), var(--scale-c-5), var(--clamp-max-c-5), var(--hue));
|
|
127
|
+
--palette-step-11: --palette-clamped-color(var(--scale-l-11), var(--scale-c-4), var(--clamp-max-c-5), var(--hue));
|
|
128
|
+
--palette-step-12: --palette-clamped-color(var(--scale-l-12), var(--scale-c-3), var(--clamp-max-c-6), var(--hue));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @mixin --palette-seed-scale: Generates a complete palette while preserving a seed color's hue. */
|
|
133
|
+
@mixin --palette-seed-scale(--seed type(*)) {
|
|
134
|
+
@result {
|
|
135
|
+
--palette-step-0: --palette-seed-color(var(--seed), var(--scale-l-0), var(--scale-c-1), var(--clamp-max-c-0));
|
|
136
|
+
--palette-step-1: --palette-seed-color(var(--seed), var(--scale-l-1), var(--scale-c-2), var(--clamp-max-c-0));
|
|
137
|
+
--palette-step-2: --palette-seed-color(var(--seed), var(--scale-l-2), var(--scale-c-3), var(--clamp-max-c-1));
|
|
138
|
+
--palette-step-3: --palette-seed-color(var(--seed), var(--scale-l-3), var(--scale-c-4), var(--clamp-max-c-1));
|
|
139
|
+
--palette-step-4: --palette-seed-color(var(--seed), var(--scale-l-4), var(--scale-c-5), var(--clamp-max-c-2));
|
|
140
|
+
--palette-step-5: --palette-seed-color(var(--seed), var(--scale-l-5), var(--scale-c-7), var(--clamp-max-c-2));
|
|
141
|
+
--palette-step-6: --palette-seed-color(var(--seed), var(--scale-l-6), var(--scale-c-8), var(--clamp-max-c-3));
|
|
142
|
+
--palette-step-7: --palette-seed-color(var(--seed), var(--scale-l-7), var(--scale-c-9), var(--clamp-max-c-3));
|
|
143
|
+
--palette-step-8: --palette-seed-color(var(--seed), var(--scale-l-8), var(--scale-c-8), var(--clamp-max-c-4));
|
|
144
|
+
--palette-step-9: --palette-seed-color(var(--seed), var(--scale-l-9), var(--scale-c-7), var(--clamp-max-c-4));
|
|
145
|
+
--palette-step-10: --palette-seed-color(var(--seed), var(--scale-l-10), var(--scale-c-5), var(--clamp-max-c-5));
|
|
146
|
+
--palette-step-11: --palette-seed-color(var(--seed), var(--scale-l-11), var(--scale-c-4), var(--clamp-max-c-5));
|
|
147
|
+
--palette-step-12: --palette-seed-color(var(--seed), var(--scale-l-12), var(--scale-c-3), var(--clamp-max-c-6));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @mixin --palette-alpha-scale: Generates transparent variants of one palette color. */
|
|
152
|
+
@mixin --palette-alpha-scale(--color type(*)) {
|
|
153
|
+
@result {
|
|
154
|
+
--palette-alpha-0: --palette-alpha(var(--color), var(--alpha-0));
|
|
155
|
+
--palette-alpha-1: --palette-alpha(var(--color), var(--alpha-1));
|
|
156
|
+
--palette-alpha-2: --palette-alpha(var(--color), var(--alpha-2));
|
|
157
|
+
--palette-alpha-3: --palette-alpha(var(--color), var(--alpha-3));
|
|
158
|
+
--palette-alpha-4: --palette-alpha(var(--color), var(--alpha-4));
|
|
159
|
+
--palette-alpha-5: --palette-alpha(var(--color), var(--alpha-5));
|
|
160
|
+
--palette-alpha-6: --palette-alpha(var(--color), var(--alpha-6));
|
|
161
|
+
--palette-alpha-7: --palette-alpha(var(--color), var(--alpha-7));
|
|
162
|
+
--palette-alpha-8: --palette-alpha(var(--color), var(--alpha-8));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** @mixin --palette-roles: Adds convenient aliases without making contrast guarantees. */
|
|
167
|
+
@mixin --palette-roles {
|
|
168
|
+
@result {
|
|
169
|
+
--palette-lightest: var(--palette-step-0);
|
|
170
|
+
--palette-subtle: var(--palette-step-2);
|
|
171
|
+
--palette-light: var(--palette-step-4);
|
|
172
|
+
--palette-mid: var(--palette-step-7);
|
|
173
|
+
--palette-dark: var(--palette-step-9);
|
|
174
|
+
--palette-strong: var(--palette-step-11);
|
|
175
|
+
--palette-darkest: var(--palette-step-12);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
/** @mixin --center-grid: Centers content using grid. */
|
|
182
|
+
@mixin --center-grid {
|
|
183
|
+
display: grid;
|
|
184
|
+
place-content: center;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** @mixin --elevation: Applies a consistent box-shadow from a scale. */
|
|
188
|
+
@mixin --elevation(--level type(*)) {
|
|
189
|
+
--shadow-1: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
190
|
+
--shadow-2: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
191
|
+
--shadow-3: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
192
|
+
@when (var(--level) = 1) { box-shadow: var(--shadow-1); }
|
|
193
|
+
@when (var(--level) = 2) { box-shadow: var(--shadow-2); }
|
|
194
|
+
@when (var(--level) = 3) { box-shadow: var(--shadow-3); }
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @mixin --visually-hidden: For accessibility. */
|
|
198
|
+
@mixin --visually-hidden {
|
|
199
|
+
position: absolute;
|
|
200
|
+
width: 1px; height: 1px;
|
|
201
|
+
padding: 0; margin: -1px;
|
|
202
|
+
overflow: hidden; clip: rect(0, 0, 0, 0);
|
|
203
|
+
white-space: nowrap; border-width: 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** @mixin --contrast-text: Applies accessible text color with fallbacks. */
|
|
207
|
+
@mixin --contrast-text(--bg-color, --threshold: 0.65) {
|
|
208
|
+
@property --bg-color { syntax: "<color>"; inherits: true; initial-value: transparent; }
|
|
209
|
+
color: white;
|
|
210
|
+
text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
|
|
211
|
+
@supports (color: oklch(from red l c h)) {
|
|
212
|
+
--l-result: clamp(0, (l / var(--threshold) - 1) * -infinity, 1);
|
|
213
|
+
color: oklch(from var(--bg-color) var(--l-result) 0 h);
|
|
214
|
+
text-shadow: none;
|
|
215
|
+
}
|
|
216
|
+
@supports (color: contrast-color(red)) {
|
|
217
|
+
color: contrast-color(var(--bg-color) to black or white);
|
|
218
|
+
text-shadow: none;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** @mixin --stack: A one-dimensional block layout with adjustable rhythm. */
|
|
223
|
+
@mixin --stack(
|
|
224
|
+
--gap type(*): var(--space-md, 1rem),
|
|
225
|
+
--align type(*): stretch
|
|
226
|
+
) {
|
|
227
|
+
display: grid;
|
|
228
|
+
gap: var(--gap);
|
|
229
|
+
align-items: var(--align);
|
|
230
|
+
min-inline-size: 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** @mixin --cluster: A wrapping inline group for actions, tags, and metadata. */
|
|
234
|
+
@mixin --cluster(
|
|
235
|
+
--gap type(*): var(--space-sm, 0.75rem),
|
|
236
|
+
--align type(*): center,
|
|
237
|
+
--justify type(*): flex-start
|
|
238
|
+
) {
|
|
239
|
+
display: flex;
|
|
240
|
+
flex-wrap: wrap;
|
|
241
|
+
align-items: var(--align);
|
|
242
|
+
justify-content: var(--justify);
|
|
243
|
+
gap: var(--gap);
|
|
244
|
+
min-inline-size: 0;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** @mixin --surface-frame: A token-driven bordered surface recipe. */
|
|
248
|
+
@mixin --surface-frame(
|
|
249
|
+
--background type(*): var(--surface-default),
|
|
250
|
+
--color type(*): var(--text-default),
|
|
251
|
+
--border-color type(*): var(--outline-subtle),
|
|
252
|
+
--radius type(*): var(--radius-lg, 0.75rem),
|
|
253
|
+
--padding type(*): var(--space-md, 1rem),
|
|
254
|
+
--shadow type(*): none
|
|
255
|
+
) {
|
|
256
|
+
padding: var(--padding);
|
|
257
|
+
border: var(--border-width, 1px) solid var(--border-color);
|
|
258
|
+
border-radius: var(--radius);
|
|
259
|
+
background: var(--background);
|
|
260
|
+
color: var(--color);
|
|
261
|
+
box-shadow: var(--shadow);
|
|
262
|
+
min-inline-size: 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** @mixin --content-region-rhythm: Compact rhythm inside composed UI regions. */
|
|
266
|
+
@mixin --content-region-rhythm(--gap type(*): var(--space-xs, 0.5rem)) {
|
|
267
|
+
display: grid;
|
|
268
|
+
gap: var(--gap);
|
|
269
|
+
min-inline-size: 0;
|
|
270
|
+
|
|
271
|
+
& > :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl) {
|
|
272
|
+
margin-block: 0;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** @mixin --focus-ring: The library's visible keyboard-focus contract. */
|
|
277
|
+
@mixin --focus-ring(
|
|
278
|
+
--color type(*): var(--outline-focus),
|
|
279
|
+
--width type(*): var(--border-width-thick, 2px),
|
|
280
|
+
--offset type(*): 2px
|
|
281
|
+
) {
|
|
282
|
+
outline: var(--width) solid var(--color);
|
|
283
|
+
outline-offset: var(--offset);
|
|
284
|
+
}
|
|
285
|
+
/* Theme mixins: property-driven role system */
|
|
286
|
+
|
|
287
|
+
@mixin --surface-role(--role type(*)) {
|
|
288
|
+
@when (var(--role) = muted) {
|
|
289
|
+
--bg: var(--surface-muted);
|
|
290
|
+
--border: var(--outline-subtle);
|
|
291
|
+
--text: var(--text-default);
|
|
292
|
+
}
|
|
293
|
+
@when (var(--role) = subtle) {
|
|
294
|
+
--bg: var(--surface-subtle);
|
|
295
|
+
--border: var(--outline-subtle);
|
|
296
|
+
--text: var(--text-default);
|
|
297
|
+
}
|
|
298
|
+
@when (var(--role) = default) {
|
|
299
|
+
--bg: var(--surface-default);
|
|
300
|
+
--border: var(--outline-default);
|
|
301
|
+
--text: var(--text-default);
|
|
302
|
+
}
|
|
303
|
+
@when (var(--role) = overt) {
|
|
304
|
+
--bg: var(--surface-overt-dark);
|
|
305
|
+
--border: var(--outline-overt);
|
|
306
|
+
--text: var(--text-overt);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
@mixin --state-adjust {
|
|
310
|
+
transition: background-color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
311
|
+
border-color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
312
|
+
color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
313
|
+
box-shadow var(--transition-duration, 150ms) var(--transition-timing, ease-out);
|
|
314
|
+
&:hover:not([disabled]) {
|
|
315
|
+
--bg: oklch(from var(--bg) calc(l + var(--l-delta-1)) c h);
|
|
316
|
+
--border: oklch(from var(--border) calc(l + var(--l-delta-1)) c h);
|
|
317
|
+
}
|
|
318
|
+
&:active:not([disabled]) {
|
|
319
|
+
--bg: oklch(from var(--bg) calc(l + var(--l-delta-1-down)) c h);
|
|
320
|
+
--border: oklch(from var(--border) calc(c + var(--c-delta-1)) l h);
|
|
321
|
+
}
|
|
322
|
+
&:focus-visible {
|
|
323
|
+
outline: var(--border-width-thick, 2px) solid var(--outline-focus);
|
|
324
|
+
outline-offset: 2px;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@mixin --contrast-text-for-bg {
|
|
329
|
+
--auto-contrast-text: oklch(from var(--bg, currentColor) clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98) min(c, var(--c-threshold, 0.08)) h);
|
|
330
|
+
|
|
331
|
+
color: var(--auto-contrast-text, oklch(
|
|
332
|
+
from var(--bg, currentColor)
|
|
333
|
+
clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98)
|
|
334
|
+
min(c, var(--c-threshold, 0.08))
|
|
335
|
+
h
|
|
336
|
+
));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@mixin --button-role(--role: default, --accent-color: var(--accent)) {
|
|
340
|
+
@mixin --surface-role(var(--role));
|
|
341
|
+
background-color: var(--bg);
|
|
342
|
+
border: var(--border-width, 1px) solid var(--border);
|
|
343
|
+
@mixin --contrast-text-for-bg;
|
|
344
|
+
@apply --state-adjust;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@mixin --input-role(--role: subtle) {
|
|
348
|
+
@mixin --surface-role(var(--role));
|
|
349
|
+
background-color: var(--bg);
|
|
350
|
+
border: var(--border-width, 1px) solid var(--border);
|
|
351
|
+
color: var(--text);
|
|
352
|
+
@apply --state-adjust;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@mixin --feedback-role(--kind type(*)) {
|
|
356
|
+
@when (var(--kind) = success) {
|
|
357
|
+
--bg: var(--surface-success);
|
|
358
|
+
--border: var(--outline-success);
|
|
359
|
+
--text: var(--text-success);
|
|
360
|
+
}
|
|
361
|
+
@when (var(--kind) = warning) {
|
|
362
|
+
--bg: var(--surface-warning);
|
|
363
|
+
--border: var(--outline-warning);
|
|
364
|
+
--text: var(--text-warning);
|
|
365
|
+
}
|
|
366
|
+
@when (var(--kind) = error) {
|
|
367
|
+
--bg: var(--surface-error);
|
|
368
|
+
--border: var(--outline-error);
|
|
369
|
+
--text: var(--text-error);
|
|
370
|
+
}
|
|
371
|
+
@when (var(--kind) = info) {
|
|
372
|
+
--bg: var(--surface-info);
|
|
373
|
+
--border: var(--outline-info);
|
|
374
|
+
--text: var(--text-info);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Accent Scale */
|
|
3
|
+
--accent-palette-0: oklch(var(--scale-l-0) min(var(--scale-c-1), var(--clamp-max-c-0)) var(--accent-h)); --accent-palette-1: oklch(var(--scale-l-1) min(var(--scale-c-2), var(--clamp-max-c-0)) var(--accent-h)); --accent-palette-2: oklch(var(--scale-l-2) min(var(--scale-c-3), var(--clamp-max-c-1)) var(--accent-h)); --accent-palette-3: oklch(var(--scale-l-3) min(var(--scale-c-4), var(--clamp-max-c-1)) var(--accent-h)); --accent-palette-4: oklch(var(--scale-l-4) min(var(--scale-c-5), var(--clamp-max-c-2)) var(--accent-h)); --accent-palette-5: oklch(var(--scale-l-5) min(var(--scale-c-7), var(--clamp-max-c-2)) var(--accent-h)); --accent-palette-6: oklch(var(--scale-l-6) min(var(--scale-c-8), var(--clamp-max-c-3)) var(--accent-h)); --accent-palette-7: oklch(var(--scale-l-7) min(var(--scale-c-9), var(--clamp-max-c-3)) var(--accent-h)); --accent-palette-8: oklch(var(--scale-l-8) min(var(--scale-c-8), var(--clamp-max-c-4)) var(--accent-h)); --accent-palette-9: oklch(var(--scale-l-9) min(var(--scale-c-7), var(--clamp-max-c-4)) var(--accent-h)); --accent-palette-10: oklch(var(--scale-l-10) min(var(--scale-c-5), var(--clamp-max-c-5)) var(--accent-h)); --accent-palette-11: oklch(var(--scale-l-11) min(var(--scale-c-4), var(--clamp-max-c-5)) var(--accent-h)); --accent-palette-12: oklch(var(--scale-l-12) min(var(--scale-c-3), var(--clamp-max-c-6)) var(--accent-h));
|
|
4
|
+
/* Secondary Scale */
|
|
5
|
+
--secondary-palette-0: oklch(var(--scale-l-0) min(var(--scale-c-1), var(--clamp-max-c-0)) var(--secondary-h)); --secondary-palette-1: oklch(var(--scale-l-1) min(var(--scale-c-2), var(--clamp-max-c-0)) var(--secondary-h)); --secondary-palette-2: oklch(var(--scale-l-2) min(var(--scale-c-3), var(--clamp-max-c-1)) var(--secondary-h)); --secondary-palette-3: oklch(var(--scale-l-3) min(var(--scale-c-4), var(--clamp-max-c-1)) var(--secondary-h)); --secondary-palette-4: oklch(var(--scale-l-4) min(var(--scale-c-5), var(--clamp-max-c-2)) var(--secondary-h)); --secondary-palette-5: oklch(var(--scale-l-5) min(var(--scale-c-7), var(--clamp-max-c-2)) var(--secondary-h)); --secondary-palette-6: oklch(var(--scale-l-6) min(var(--scale-c-8), var(--clamp-max-c-3)) var(--secondary-h)); --secondary-palette-7: oklch(var(--scale-l-7) min(var(--scale-c-9), var(--clamp-max-c-3)) var(--secondary-h)); --secondary-palette-8: oklch(var(--scale-l-8) min(var(--scale-c-8), var(--clamp-max-c-4)) var(--secondary-h)); --secondary-palette-9: oklch(var(--scale-l-9) min(var(--scale-c-7), var(--clamp-max-c-4)) var(--secondary-h)); --secondary-palette-10: oklch(var(--scale-l-10) min(var(--scale-c-5), var(--clamp-max-c-5)) var(--secondary-h)); --secondary-palette-11: oklch(var(--scale-l-11) min(var(--scale-c-4), var(--clamp-max-c-5)) var(--secondary-h)); --secondary-palette-12: oklch(var(--scale-l-12) min(var(--scale-c-3), var(--clamp-max-c-6)) var(--secondary-h));
|
|
6
|
+
/* Tertiary Scale */
|
|
7
|
+
--tertiary-palette-0: oklch(var(--scale-l-0) min(var(--scale-c-1), var(--clamp-max-c-0)) var(--tertiary-h)); --tertiary-palette-1: oklch(var(--scale-l-1) min(var(--scale-c-2), var(--clamp-max-c-0)) var(--tertiary-h)); --tertiary-palette-2: oklch(var(--scale-l-2) min(var(--scale-c-3), var(--clamp-max-c-1)) var(--tertiary-h)); --tertiary-palette-3: oklch(var(--scale-l-3) min(var(--scale-c-4), var(--clamp-max-c-1)) var(--tertiary-h)); --tertiary-palette-4: oklch(var(--scale-l-4) min(var(--scale-c-5), var(--clamp-max-c-2)) var(--tertiary-h)); --tertiary-palette-5: oklch(var(--scale-l-5) min(var(--scale-c-7), var(--clamp-max-c-2)) var(--tertiary-h)); --tertiary-palette-6: oklch(var(--scale-l-6) min(var(--scale-c-8), var(--clamp-max-c-3)) var(--tertiary-h)); --tertiary-palette-7: oklch(var(--scale-l-7) min(var(--scale-c-9), var(--clamp-max-c-3)) var(--tertiary-h)); --tertiary-palette-8: oklch(var(--scale-l-8) min(var(--scale-c-8), var(--clamp-max-c-4)) var(--tertiary-h)); --tertiary-palette-9: oklch(var(--scale-l-9) min(var(--scale-c-7), var(--clamp-max-c-4)) var(--tertiary-h)); --tertiary-palette-10: oklch(var(--scale-l-10) min(var(--scale-c-5), var(--clamp-max-c-5)) var(--tertiary-h)); --tertiary-palette-11: oklch(var(--scale-l-11) min(var(--scale-c-4), var(--clamp-max-c-5)) var(--tertiary-h)); --tertiary-palette-12: oklch(var(--scale-l-12) min(var(--scale-c-3), var(--clamp-max-c-6)) var(--tertiary-h));
|
|
8
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Additional Hues */
|
|
3
|
+
--hue-brown: 55;
|
|
4
|
+
--hue-gold: 85;
|
|
5
|
+
--hue-olive: 95;
|
|
6
|
+
--hue-magenta: 320;
|
|
7
|
+
/* Max Chroma Clamps */
|
|
8
|
+
--clamp-max-c-0: var(--max-chroma-0); --clamp-max-c-1: var(--max-chroma-1);
|
|
9
|
+
--clamp-max-c-2: var(--max-chroma-2); --clamp-max-c-3: var(--max-chroma-3);
|
|
10
|
+
--clamp-max-c-4: var(--max-chroma-4); --clamp-max-c-5: var(--max-chroma-5);
|
|
11
|
+
--clamp-max-c-6: var(--max-chroma-6);
|
|
12
|
+
--clamp-error-max-c-2: calc(var(--max-chroma-2) * 1.1); --clamp-error-max-c-3: calc(var(--max-chroma-3) * 1.1); --clamp-error-max-c-4: calc(var(--max-chroma-4) * 1.1);
|
|
13
|
+
--clamp-orange-max-c-2: calc(var(--max-chroma-2) * 1.1); --clamp-orange-max-c-3: calc(var(--max-chroma-3) * 1.1); --clamp-orange-max-c-4: calc(var(--max-chroma-4) * 1.1);
|
|
14
|
+
--clamp-neutral-max-c-0: calc(var(--max-chroma-0) * 0.5); --clamp-neutral-max-c-1: calc(var(--max-chroma-1) * 0.5); --clamp-neutral-max-c-2: calc(var(--max-chroma-2) * 0.5);
|
|
15
|
+
--clamp-neutral-max-c-3: calc(var(--max-chroma-3) * 0.5); --clamp-neutral-max-c-4: calc(var(--max-chroma-4) * 0.5); --clamp-neutral-max-c-5: calc(var(--max-chroma-5) * 0.5); --clamp-neutral-max-c-6: calc(var(--max-chroma-6) * 0.5);
|
|
16
|
+
|
|
17
|
+
/* Perceptual chroma profiles for named color families. */
|
|
18
|
+
/* Brown */
|
|
19
|
+
--palette-brown-chroma-0: 0.011;
|
|
20
|
+
--palette-brown-chroma-1: 0.022;
|
|
21
|
+
--palette-brown-chroma-2: 0.033;
|
|
22
|
+
--palette-brown-chroma-3: 0.044;
|
|
23
|
+
--palette-brown-chroma-4: 0.055;
|
|
24
|
+
--palette-brown-chroma-5: 0.083;
|
|
25
|
+
--palette-brown-chroma-6: 0.099;
|
|
26
|
+
--palette-brown-chroma-7: 0.121;
|
|
27
|
+
--palette-brown-chroma-8: 0.099;
|
|
28
|
+
--palette-brown-chroma-9: 0.083;
|
|
29
|
+
--palette-brown-chroma-10: 0.055;
|
|
30
|
+
--palette-brown-chroma-11: 0.044;
|
|
31
|
+
--palette-brown-chroma-12: 0.033;
|
|
32
|
+
/* Gold */
|
|
33
|
+
--palette-gold-chroma-0: 0.022;
|
|
34
|
+
--palette-gold-chroma-1: 0.044;
|
|
35
|
+
--palette-gold-chroma-2: 0.066;
|
|
36
|
+
--palette-gold-chroma-3: 0.088;
|
|
37
|
+
--palette-gold-chroma-4: 0.11;
|
|
38
|
+
--palette-gold-chroma-5: 0.165;
|
|
39
|
+
--palette-gold-chroma-6: 0.198;
|
|
40
|
+
--palette-gold-chroma-7: 0.22;
|
|
41
|
+
--palette-gold-chroma-8: 0.18;
|
|
42
|
+
--palette-gold-chroma-9: 0.165;
|
|
43
|
+
--palette-gold-chroma-10: 0.11;
|
|
44
|
+
--palette-gold-chroma-11: 0.088;
|
|
45
|
+
--palette-gold-chroma-12: 0.06;
|
|
46
|
+
/* Orange */
|
|
47
|
+
--palette-orange-chroma-0: 0.023;
|
|
48
|
+
--palette-orange-chroma-1: 0.046;
|
|
49
|
+
--palette-orange-chroma-2: 0.069;
|
|
50
|
+
--palette-orange-chroma-3: 0.092;
|
|
51
|
+
--palette-orange-chroma-4: 0.115;
|
|
52
|
+
--palette-orange-chroma-5: 0.138;
|
|
53
|
+
--palette-orange-chroma-6: 0.207;
|
|
54
|
+
--palette-orange-chroma-7: 0.24;
|
|
55
|
+
--palette-orange-chroma-8: 0.2;
|
|
56
|
+
--palette-orange-chroma-9: 0.173;
|
|
57
|
+
--palette-orange-chroma-10: 0.115;
|
|
58
|
+
--palette-orange-chroma-11: 0.092;
|
|
59
|
+
--palette-orange-chroma-12: 0.06;
|
|
60
|
+
/* Yellow */
|
|
61
|
+
--palette-yellow-chroma-0: 0.028;
|
|
62
|
+
--palette-yellow-chroma-1: 0.056;
|
|
63
|
+
--palette-yellow-chroma-2: 0.084;
|
|
64
|
+
--palette-yellow-chroma-3: 0.112;
|
|
65
|
+
--palette-yellow-chroma-4: 0.14;
|
|
66
|
+
--palette-yellow-chroma-5: 0.168;
|
|
67
|
+
--palette-yellow-chroma-6: 0.21;
|
|
68
|
+
--palette-yellow-chroma-7: 0.24;
|
|
69
|
+
--palette-yellow-chroma-8: 0.2;
|
|
70
|
+
--palette-yellow-chroma-9: 0.168;
|
|
71
|
+
--palette-yellow-chroma-10: 0.13;
|
|
72
|
+
--palette-yellow-chroma-11: 0.112;
|
|
73
|
+
--palette-yellow-chroma-12: 0.065;
|
|
74
|
+
/* Cyan */
|
|
75
|
+
--palette-cyan-chroma-0: 0.022;
|
|
76
|
+
--palette-cyan-chroma-1: 0.04;
|
|
77
|
+
--palette-cyan-chroma-2: 0.066;
|
|
78
|
+
--palette-cyan-chroma-3: 0.08;
|
|
79
|
+
--palette-cyan-chroma-4: 0.11;
|
|
80
|
+
--palette-cyan-chroma-5: 0.132;
|
|
81
|
+
--palette-cyan-chroma-6: 0.165;
|
|
82
|
+
--palette-cyan-chroma-7: 0.198;
|
|
83
|
+
--palette-cyan-chroma-8: 0.165;
|
|
84
|
+
--palette-cyan-chroma-9: 0.132;
|
|
85
|
+
--palette-cyan-chroma-10: 0.11;
|
|
86
|
+
--palette-cyan-chroma-11: 0.088;
|
|
87
|
+
--palette-cyan-chroma-12: 0.06;
|
|
88
|
+
/* Slate */
|
|
89
|
+
--palette-slate-chroma-0: 0.006;
|
|
90
|
+
--palette-slate-chroma-1: 0.012;
|
|
91
|
+
--palette-slate-chroma-2: 0.018;
|
|
92
|
+
--palette-slate-chroma-3: 0.024;
|
|
93
|
+
--palette-slate-chroma-4: 0.03;
|
|
94
|
+
--palette-slate-chroma-5: 0.036;
|
|
95
|
+
--palette-slate-chroma-6: 0.045;
|
|
96
|
+
--palette-slate-chroma-7: 0.054;
|
|
97
|
+
--palette-slate-chroma-8: 0.045;
|
|
98
|
+
--palette-slate-chroma-9: 0.036;
|
|
99
|
+
--palette-slate-chroma-10: 0.03;
|
|
100
|
+
--palette-slate-chroma-11: 0.024;
|
|
101
|
+
--palette-slate-chroma-12: 0.018;
|
|
102
|
+
|
|
103
|
+
/* Gray Scale */
|
|
104
|
+
--gray-0: oklch(var(--scale-l-0) 0 0); --gray-1: oklch(var(--scale-l-1) 0 0); --gray-2: oklch(var(--scale-l-2) 0 0); --gray-3: oklch(var(--scale-l-3) 0 0); --gray-4: oklch(var(--scale-l-4) 0 0); --gray-5: oklch(var(--scale-l-5) 0 0); --gray-6: oklch(var(--scale-l-6) 0 0); --gray-7: oklch(var(--scale-l-7) 0 0); --gray-8: oklch(var(--scale-l-8) 0 0); --gray-9: oklch(var(--scale-l-9) 0 0); --gray-10: oklch(var(--scale-l-10) 0 0); --gray-11: oklch(var(--scale-l-11) 0 0); --gray-12: oklch(var(--scale-l-12) 0 0);
|
|
105
|
+
/* Neutral Scale */
|
|
106
|
+
--neutral-0: oklch(var(--scale-l-0) min(var(--scale-c-0), var(--clamp-neutral-max-c-0)) var(--neutral-h)); --neutral-1: oklch(var(--scale-l-1) min(var(--scale-c-1), var(--clamp-neutral-max-c-0)) var(--neutral-h)); --neutral-2: oklch(var(--scale-l-2) min(var(--scale-c-1), var(--clamp-neutral-max-c-1)) var(--neutral-h)); --neutral-3: oklch(var(--scale-l-3) min(var(--scale-c-1), var(--clamp-neutral-max-c-1)) var(--neutral-h)); --neutral-4: oklch(var(--scale-l-4) min(var(--scale-c-1), var(--clamp-neutral-max-c-2)) var(--neutral-h)); --neutral-5: oklch(var(--scale-l-5) min(var(--scale-c-2), var(--clamp-neutral-max-c-2)) var(--neutral-h)); --neutral-6: oklch(var(--scale-l-6) min(var(--scale-c-2), var(--clamp-neutral-max-c-3)) var(--neutral-h)); --neutral-7: oklch(var(--scale-l-7) min(var(--scale-c-2), var(--clamp-neutral-max-c-3)) var(--neutral-h)); --neutral-8: oklch(var(--scale-l-8) min(var(--scale-c-2), var(--clamp-neutral-max-c-4)) var(--neutral-h)); --neutral-9: oklch(var(--scale-l-9) min(var(--scale-c-2), var(--clamp-neutral-max-c-4)) var(--neutral-h)); --neutral-10: oklch(var(--scale-l-10) min(var(--scale-c-1), var(--clamp-neutral-max-c-5)) var(--neutral-h)); --neutral-11: oklch(var(--scale-l-11) min(var(--scale-c-1), var(--clamp-neutral-max-c-5)) var(--neutral-h)); --neutral-12: oklch(var(--scale-l-12) min(var(--scale-c-1), var(--clamp-neutral-max-c-6)) var(--neutral-h));
|
|
107
|
+
}
|