@splendidlabz/styles 4.9.0 → 4.11.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/package.json +1 -1
- package/scripts/all.js +3 -0
- package/scripts/index.js +1 -0
- package/scripts/spotlight.js +93 -0
- package/src/components/css/simple-svg.css +10 -13
- package/src/components/css/strikethrough.css +25 -0
- package/src/components/css/writing-mode.css +18 -22
- package/src/components/svelte/browserframe.css +4 -0
- package/src/effects/bezel.css +334 -0
- package/src/effects/fancybox.css +0 -3
- package/src/effects/gradients.css +59 -18
- package/src/effects/highlight.css +129 -10
- package/src/effects/index.css +1 -0
- package/src/effects/inner-border.css +8 -14
- package/src/effects/shadows.css +187 -33
- package/src/effects/testgb.css +372 -0
- package/src/effects/text.css +8 -40
- package/src/layouts/micro/breakout.css +7 -7
- package/src/layouts/micro/inner-spacing.css +6 -6
- package/src/layouts/position/nudge.css +3 -3
- package/src/tools/color.css +2 -2
- package/src/tools/interact.css +10 -11
- package/src/tools/outlines.css +16 -21
- package/src/tools/pigment.css +11 -15
- package/src/tools/scaffolds.css +38 -27
- package/src/tools/transitions.css +5 -4
- package/src/type/font-position.css +9 -11
- package/src/variables/variables.css +2 -2
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* testgb — minimal empirical tests for gradient transition ergonomics.
|
|
3
|
+
*
|
|
4
|
+
* Three isolated cases. Hover each box to trigger the transition.
|
|
5
|
+
* Watch for: smooth interpolation vs. discrete snap.
|
|
6
|
+
*
|
|
7
|
+
* Test 1: Registered <color> embedded inside a freeform stops string.
|
|
8
|
+
* → Does the gradient redraw smoothly when registered colors
|
|
9
|
+
* interpolate, even when concatenated into --stops?
|
|
10
|
+
*
|
|
11
|
+
* Test 2: color-mix() driven by a registered <number> alpha multiplier.
|
|
12
|
+
* → Does a single scalar control fade the whole ring smoothly?
|
|
13
|
+
*
|
|
14
|
+
* Test 3: Registered <length> animating a radial size.
|
|
15
|
+
* → Does geometry interpolate smoothly inside the gradient?
|
|
16
|
+
* (circle in radial-gradient takes <length> only, not %.)
|
|
17
|
+
*
|
|
18
|
+
* Test 4: Registered <color> → <color> (not alpha) inside freeform stops.
|
|
19
|
+
* → Does an arbitrary color shift interpolate, not just opacity?
|
|
20
|
+
*
|
|
21
|
+
* Test 5: Registered <percentage> animating a stop position.
|
|
22
|
+
* → Can the stop % itself transition?
|
|
23
|
+
*
|
|
24
|
+
* Test 6: Registered <color> where BOTH hue and alpha change at once.
|
|
25
|
+
* → e.g. transparent red → opaque blue in one shot.
|
|
26
|
+
*
|
|
27
|
+
* Mark up:
|
|
28
|
+
* <div class="testgb testgb-1">alpha stops</div>
|
|
29
|
+
* <div class="testgb testgb-2">alpha mix</div>
|
|
30
|
+
* <div class="testgb testgb-3">size</div>
|
|
31
|
+
* <div class="testgb testgb-4">color → color</div>
|
|
32
|
+
* <div class="testgb testgb-5">stop position</div>
|
|
33
|
+
* <div class="testgb testgb-6">color + alpha</div>
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
@property --testgb-c1 {
|
|
37
|
+
syntax: '<color>';
|
|
38
|
+
inherits: true;
|
|
39
|
+
initial-value: rgb(255 0 0 / 0%);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@property --testgb-c2 {
|
|
43
|
+
syntax: '<color>';
|
|
44
|
+
inherits: true;
|
|
45
|
+
initial-value: rgb(0 0 255 / 0%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@property --testgb-alpha {
|
|
49
|
+
syntax: '<number>';
|
|
50
|
+
inherits: true;
|
|
51
|
+
initial-value: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@property --testgb-size {
|
|
55
|
+
syntax: '<length>';
|
|
56
|
+
inherits: true;
|
|
57
|
+
initial-value: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@property --testgb-c3 {
|
|
61
|
+
syntax: '<color>';
|
|
62
|
+
inherits: true;
|
|
63
|
+
initial-value: oklch(70% 0.2 25deg);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@property --testgb-c4 {
|
|
67
|
+
syntax: '<color>';
|
|
68
|
+
inherits: true;
|
|
69
|
+
initial-value: oklch(70% 0.2 280deg);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@property --testgb-pos {
|
|
73
|
+
syntax: '<percentage>';
|
|
74
|
+
inherits: true;
|
|
75
|
+
initial-value: 20%;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@property --testgb-c5 {
|
|
79
|
+
syntax: '<color>';
|
|
80
|
+
inherits: true;
|
|
81
|
+
initial-value: rgb(255 0 0 / 0%);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@utility testgb {
|
|
85
|
+
display: inline-grid;
|
|
86
|
+
place-items: center;
|
|
87
|
+
width: 12rem;
|
|
88
|
+
height: 8rem;
|
|
89
|
+
border-radius: 0.75rem;
|
|
90
|
+
font: 600 0.875rem system-ui;
|
|
91
|
+
color: white;
|
|
92
|
+
text-shadow: 0 1px 2px rgb(0 0 0 / 50%);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ─── Test 1: registered colors inside a freeform stops list ─────────── */
|
|
96
|
+
@utility testgb-1 {
|
|
97
|
+
--testgb-stops: var(--testgb-c1) 0%, var(--testgb-c2) 100%;
|
|
98
|
+
background: linear-gradient(to right, var(--testgb-stops));
|
|
99
|
+
transition:
|
|
100
|
+
--testgb-c1 600ms ease,
|
|
101
|
+
--testgb-c2 600ms ease;
|
|
102
|
+
|
|
103
|
+
&:hover {
|
|
104
|
+
--testgb-c1: rgb(255 0 0 / 100%);
|
|
105
|
+
--testgb-c2: rgb(0 0 255 / 100%);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* ─── Test 2: color-mix alpha multiplier (single knob) ───────────────── */
|
|
110
|
+
@utility testgb-2 {
|
|
111
|
+
--testgb-mix-1: color-mix(
|
|
112
|
+
in oklch,
|
|
113
|
+
oklch(70% 0.2 25deg) calc(var(--testgb-alpha) * 100%),
|
|
114
|
+
transparent
|
|
115
|
+
);
|
|
116
|
+
--testgb-mix-2: color-mix(
|
|
117
|
+
in oklch,
|
|
118
|
+
oklch(70% 0.2 280deg) calc(var(--testgb-alpha) * 100%),
|
|
119
|
+
transparent
|
|
120
|
+
);
|
|
121
|
+
background: linear-gradient(
|
|
122
|
+
to right,
|
|
123
|
+
var(--testgb-mix-1),
|
|
124
|
+
var(--testgb-mix-2)
|
|
125
|
+
);
|
|
126
|
+
transition: --testgb-alpha 600ms ease;
|
|
127
|
+
|
|
128
|
+
&:hover {
|
|
129
|
+
--testgb-alpha: 1;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* ─── Test 3: registered length animating gradient geometry ──────────── */
|
|
134
|
+
@utility testgb-3 {
|
|
135
|
+
background: radial-gradient(
|
|
136
|
+
circle var(--testgb-size) at center,
|
|
137
|
+
oklch(70% 0.2 140deg) 0%,
|
|
138
|
+
transparent 100%
|
|
139
|
+
);
|
|
140
|
+
transition: --testgb-size 600ms ease;
|
|
141
|
+
|
|
142
|
+
&:hover {
|
|
143
|
+
--testgb-size: 150px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* ─── Test 4: color → color (not alpha) inside freeform stops ────────── */
|
|
148
|
+
@utility testgb-4 {
|
|
149
|
+
--testgb-stops-2: var(--testgb-c3) 0%, var(--testgb-c4) 100%;
|
|
150
|
+
background: linear-gradient(to right, var(--testgb-stops-2));
|
|
151
|
+
transition:
|
|
152
|
+
--testgb-c3 600ms ease,
|
|
153
|
+
--testgb-c4 600ms ease;
|
|
154
|
+
|
|
155
|
+
&:hover {
|
|
156
|
+
--testgb-c3: oklch(70% 0.2 140deg);
|
|
157
|
+
--testgb-c4: oklch(70% 0.2 60deg);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ─── Test 5: stop position % transitions ────────────────────────────── */
|
|
162
|
+
@utility testgb-5 {
|
|
163
|
+
background: linear-gradient(
|
|
164
|
+
to right,
|
|
165
|
+
oklch(70% 0.2 25deg) var(--testgb-pos),
|
|
166
|
+
oklch(70% 0.2 280deg) 100%
|
|
167
|
+
);
|
|
168
|
+
transition: --testgb-pos 600ms ease;
|
|
169
|
+
|
|
170
|
+
&:hover {
|
|
171
|
+
--testgb-pos: 80%;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* ─── Test 6: color + alpha changing simultaneously ──────────────────── */
|
|
176
|
+
@utility testgb-6 {
|
|
177
|
+
background: linear-gradient(
|
|
178
|
+
to right,
|
|
179
|
+
var(--testgb-c5),
|
|
180
|
+
oklch(70% 0.2 280deg)
|
|
181
|
+
);
|
|
182
|
+
transition: --testgb-c5 600ms ease;
|
|
183
|
+
|
|
184
|
+
&:hover {
|
|
185
|
+
--testgb-c5: rgb(0 200 100 / 100%);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ─── Test 7: spotlight — radial bloom at cursor, faded by proximity ───
|
|
190
|
+
*
|
|
191
|
+
* One radial gradient. Position always tracks the cursor via --x/--y.
|
|
192
|
+
* Visibility is gated by --proximity (set by the .spotlight utility):
|
|
193
|
+
* • cursor far from card → proximity 0 → bloom is transparent
|
|
194
|
+
* • cursor on card → proximity 1 → bloom fully visible
|
|
195
|
+
*
|
|
196
|
+
* The gradient image is always painted; only its color alpha changes,
|
|
197
|
+
* so we never hit the discrete `image ↔ none` snap.
|
|
198
|
+
*
|
|
199
|
+
* --inner-size doubles as the bloom radius AND the proximity reach
|
|
200
|
+
* (via .spotlight's max(--inner-size, --outer-size) falloff).
|
|
201
|
+
*
|
|
202
|
+
* Mark up: <div class="testgb testgb-7 spotlight">spotlight</div>
|
|
203
|
+
* Requires the spotlight tracker (packages/styles/scripts/spotlight.js).
|
|
204
|
+
*/
|
|
205
|
+
@utility testgb-7 {
|
|
206
|
+
--inner-size: 120px;
|
|
207
|
+
background: radial-gradient(
|
|
208
|
+
circle var(--inner-size) at var(--x, 50%) var(--y, 50%),
|
|
209
|
+
color-mix(
|
|
210
|
+
in oklch,
|
|
211
|
+
oklch(70% 0.2 25deg) calc(var(--proximity, 0) * 100%),
|
|
212
|
+
transparent
|
|
213
|
+
),
|
|
214
|
+
transparent
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* ─── Test 8: bezel spotlight — shiny rim, calm body ──────────────
|
|
219
|
+
*
|
|
220
|
+
* Real-world application of the spotlight pattern through `bezel`.
|
|
221
|
+
* Card body stays calm; the rim catches the light where the cursor is
|
|
222
|
+
* nearby — like a metal edge reflecting a passing torch.
|
|
223
|
+
*
|
|
224
|
+
* Layer breakdown:
|
|
225
|
+
* • Rim (outer-gradient on border-box): dim base color always present;
|
|
226
|
+
* brightens to a sharp glow at the cursor as --proximity → 1.
|
|
227
|
+
* • Body (inner-gradient on padding-box over --bg-color): subtle wash
|
|
228
|
+
* of the same hue, low alpha, smaller bloom — felt, not seen.
|
|
229
|
+
*
|
|
230
|
+
* --outer-size and --inner-size are kept equal: one spotlight, one reach.
|
|
231
|
+
* If the body sheen had a shorter reach than the rim, the rim would
|
|
232
|
+
* glow at distances no light has actually arrived at — breaks the
|
|
233
|
+
* single-light-source illusion. Tune intensity via color/alpha, not size.
|
|
234
|
+
*
|
|
235
|
+
* Mark up: <div class="testgb testgb-8 spotlight">spotlight</div>
|
|
236
|
+
*/
|
|
237
|
+
@utility testgb-8 {
|
|
238
|
+
@apply bezel;
|
|
239
|
+
--border-width: 2px;
|
|
240
|
+
--radius: 0.75rem;
|
|
241
|
+
--bg-color: oklch(22% 0.02 250deg);
|
|
242
|
+
--outer-size: 119px;
|
|
243
|
+
--inner-size: 119px;
|
|
244
|
+
--outer-gradient: radial-gradient(
|
|
245
|
+
circle var(--outer-size) at var(--x, 50%) var(--y, 50%),
|
|
246
|
+
color-mix(
|
|
247
|
+
in oklch,
|
|
248
|
+
oklch(95% 0.22 230deg) calc(var(--proximity, 0) * 100%),
|
|
249
|
+
oklch(35% 0.04 250deg)
|
|
250
|
+
),
|
|
251
|
+
oklch(35% 0.04 250deg)
|
|
252
|
+
);
|
|
253
|
+
--inner-gradient: radial-gradient(
|
|
254
|
+
circle var(--inner-size) at var(--x, 50%) var(--y, 50%),
|
|
255
|
+
color-mix(
|
|
256
|
+
in oklch,
|
|
257
|
+
oklch(72% 0.12 230deg / 32%) calc(var(--proximity, 0) * 100%),
|
|
258
|
+
transparent
|
|
259
|
+
),
|
|
260
|
+
transparent
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* ─── Test 9: bezel spotlight — three-stop specular rim ───────────
|
|
265
|
+
*
|
|
266
|
+
* Same setup as Test 8, but the rim uses a three-stop gradient with a
|
|
267
|
+
* near-white "hot core" at the cursor before the chromatic glow takes
|
|
268
|
+
* over. Reads more like a polished edge catching a real highlight —
|
|
269
|
+
* specular instead of diffuse.
|
|
270
|
+
*
|
|
271
|
+
* Stop breakdown (cursor-active state):
|
|
272
|
+
* • 0% → near-white sparkle (oklch 98% / low chroma)
|
|
273
|
+
* • 40% → chromatic glow (oklch 95% 0.22)
|
|
274
|
+
* • 100% → dim rim base
|
|
275
|
+
*
|
|
276
|
+
* Each lit stop is color-mixed against the dim base by --proximity, so
|
|
277
|
+
* when the cursor is far the three stops collapse to the same base color
|
|
278
|
+
* (uniform-stops trick → solid dim rim, no hot core leaking through).
|
|
279
|
+
*
|
|
280
|
+
* Mark up: <div class="testgb testgb-9 spotlight">spotlight</div>
|
|
281
|
+
*/
|
|
282
|
+
@utility testgb-9 {
|
|
283
|
+
@apply bezel;
|
|
284
|
+
--border-width: 2px;
|
|
285
|
+
--radius: 0.75rem;
|
|
286
|
+
--bg-color: oklch(22% 0.02 250deg);
|
|
287
|
+
--outer-size: 119px;
|
|
288
|
+
--inner-size: 119px;
|
|
289
|
+
--rim-base: oklch(35% 0.04 250deg);
|
|
290
|
+
--outer-gradient: radial-gradient(
|
|
291
|
+
circle var(--outer-size) at var(--x, 50%) var(--y, 50%) in oklab,
|
|
292
|
+
color-mix(
|
|
293
|
+
in oklab,
|
|
294
|
+
oklch(100% 0 0deg) calc(var(--proximity, 0) * 100%),
|
|
295
|
+
var(--rim-base)
|
|
296
|
+
)
|
|
297
|
+
0%,
|
|
298
|
+
color-mix(
|
|
299
|
+
in oklab,
|
|
300
|
+
oklch(78% 0.2 245deg) calc(var(--proximity, 0) * 100%),
|
|
301
|
+
var(--rim-base)
|
|
302
|
+
)
|
|
303
|
+
40%,
|
|
304
|
+
var(--rim-base) 100%
|
|
305
|
+
);
|
|
306
|
+
--inner-gradient: radial-gradient(
|
|
307
|
+
circle var(--inner-size) at var(--x, 50%) var(--y, 50%),
|
|
308
|
+
color-mix(
|
|
309
|
+
in oklch,
|
|
310
|
+
oklch(72% 0.12 230deg / 32%) calc(var(--proximity, 0) * 100%),
|
|
311
|
+
transparent
|
|
312
|
+
),
|
|
313
|
+
transparent
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* ─── Test 10: bezel-frost — gradient rim around frosted glass ─────────
|
|
318
|
+
*
|
|
319
|
+
* Ring lives on ::before (mask-composite). The element itself carries
|
|
320
|
+
* backdrop-filter, so a translucent `background` lets blurred content
|
|
321
|
+
* from behind show through. Wrap in a stage with visible backdrop
|
|
322
|
+
* content so the blur actually has something to blur.
|
|
323
|
+
*
|
|
324
|
+
* Mark up:
|
|
325
|
+
* <div class="testgb-stage">
|
|
326
|
+
* <div class="testgb testgb-10">frost</div>
|
|
327
|
+
* </div>
|
|
328
|
+
*/
|
|
329
|
+
@utility testgb-stage {
|
|
330
|
+
display: inline-block;
|
|
331
|
+
padding: 3rem;
|
|
332
|
+
background:
|
|
333
|
+
radial-gradient(
|
|
334
|
+
circle at 15% 25%,
|
|
335
|
+
oklch(72% 0.22 25deg) 0 70px,
|
|
336
|
+
transparent 72px
|
|
337
|
+
),
|
|
338
|
+
radial-gradient(
|
|
339
|
+
circle at 82% 18%,
|
|
340
|
+
oklch(80% 0.18 140deg) 0 55px,
|
|
341
|
+
transparent 57px
|
|
342
|
+
),
|
|
343
|
+
radial-gradient(
|
|
344
|
+
circle at 70% 78%,
|
|
345
|
+
oklch(70% 0.22 280deg) 0 80px,
|
|
346
|
+
transparent 82px
|
|
347
|
+
),
|
|
348
|
+
radial-gradient(
|
|
349
|
+
circle at 22% 82%,
|
|
350
|
+
oklch(78% 0.2 60deg) 0 50px,
|
|
351
|
+
transparent 52px
|
|
352
|
+
),
|
|
353
|
+
radial-gradient(
|
|
354
|
+
circle at 50% 50%,
|
|
355
|
+
oklch(85% 0.12 200deg) 0 40px,
|
|
356
|
+
transparent 42px
|
|
357
|
+
),
|
|
358
|
+
oklch(95% 0.02 230deg);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
@utility testgb-10 {
|
|
362
|
+
@apply bezel-frost;
|
|
363
|
+
--border-width: 2px;
|
|
364
|
+
--radius: 0.75rem;
|
|
365
|
+
--frost: 12px;
|
|
366
|
+
--outer-gradient: linear-gradient(
|
|
367
|
+
135deg,
|
|
368
|
+
oklch(95% 0.2 230deg),
|
|
369
|
+
oklch(75% 0.22 320deg)
|
|
370
|
+
);
|
|
371
|
+
background: rgb(255 255 255 / 10%);
|
|
372
|
+
}
|
package/src/effects/text.css
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
@utility text-stroke {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
font-size: calc(1em - var(--stroke-width, 0.1em) / 2);
|
|
3
|
+
color: currentcolor;
|
|
4
|
+
-webkit-text-fill-color: currentcolor;
|
|
5
|
+
-webkit-text-stroke-width: max(var(--stroke-width, 0.1em), 2px);
|
|
6
|
+
-webkit-text-stroke-color: var(--stroke-color);
|
|
7
|
+
paint-order: stroke fill;
|
|
7
8
|
}
|
|
8
9
|
|
|
10
|
+
/* Deprecated */
|
|
9
11
|
/* Sets color to background color and stroke to actual color you want for the stroke */
|
|
10
12
|
@utility text-outline {
|
|
11
13
|
color: var(--stroke-color); /* fallback */
|
|
@@ -16,41 +18,7 @@
|
|
|
16
18
|
-webkit-text-stroke-color: var(--stroke-color);
|
|
17
19
|
|
|
18
20
|
/* We cannot use currentcolor because current color is set to --bg-color. That's why we need a --stroke variable */
|
|
19
|
-
-webkit-text-stroke-width: var(--stroke-width, 0.1em);
|
|
21
|
+
-webkit-text-stroke-width: max(var(--stroke-width, 0.1em), 2px);
|
|
20
22
|
paint-order: stroke fill;
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
|
-
|
|
24
|
-
@utility writing-normal {
|
|
25
|
-
transition: none;
|
|
26
|
-
writing-mode: horizontal-tb;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@utility writing-rotate-left {
|
|
30
|
-
transform: rotate(180deg);
|
|
31
|
-
transition: none;
|
|
32
|
-
writing-mode: vertical-rl;
|
|
33
|
-
text-orientation: sideways;
|
|
34
|
-
|
|
35
|
-
/* // transform: scale( -1, -1 ); // This is the alternative if we don't want to use rotate (though I'm not sure if there is a specific reason why. */
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@utility writing-rotate-right {
|
|
39
|
-
transition: none;
|
|
40
|
-
writing-mode: vertical-rl;
|
|
41
|
-
text-orientation: sideways;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@utility writing-downwards {
|
|
45
|
-
writing-mode: vertical-lr;
|
|
46
|
-
text-orientation: upright;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@utility writing-downwards-lr {
|
|
50
|
-
@apply writing-downwards;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@utility writing-downwards-rl {
|
|
54
|
-
writing-mode: vertical-rl;
|
|
55
|
-
text-orientation: upright;
|
|
56
|
-
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/* prettier-ignore */
|
|
2
2
|
@utility breakout-* {
|
|
3
|
-
margin-inline:
|
|
3
|
+
margin-inline: --spacing(--value(integer) * -1);
|
|
4
4
|
margin-inline: calc(--value([length]) * -1);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/* prettier-ignore */
|
|
8
8
|
@utility breakout-x-* {
|
|
9
|
-
margin-inline:
|
|
9
|
+
margin-inline: --spacing(--value(integer) * -1);
|
|
10
10
|
margin-inline: calc(--value([length]) * -1);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/* prettier-ignore */
|
|
14
14
|
@utility breakout-l-* {
|
|
15
|
-
margin-inline-start:
|
|
15
|
+
margin-inline-start: --spacing(--value(integer) * -1);
|
|
16
16
|
margin-inline-start: calc(--value([length]) * -1);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/* prettier-ignore */
|
|
20
20
|
@utility breakout-r-* {
|
|
21
|
-
margin-inline-end:
|
|
21
|
+
margin-inline-end: --spacing(--value(integer) * -1);
|
|
22
22
|
margin-inline-end: calc(--value([length]) * -1);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
|
|
29
29
|
/* prettier-ignore */
|
|
30
30
|
@utility breakout-y-* {
|
|
31
|
-
margin-block:
|
|
31
|
+
margin-block: --spacing(--value(integer) * -1);
|
|
32
32
|
margin-block: calc(--value([length]) * -1);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* prettier-ignore */
|
|
36
36
|
@utility breakout-t-* {
|
|
37
|
-
margin-block-start:
|
|
37
|
+
margin-block-start: --spacing(--value(integer) * -1);
|
|
38
38
|
margin-block-start: calc(--value([length]) * -1);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/* prettier-ignore */
|
|
42
42
|
@utility breakout-b-* {
|
|
43
|
-
margin-block-end:
|
|
43
|
+
margin-block-end: --spacing(--value(integer) * -1);
|
|
44
44
|
margin-block-end: calc(--value([length]) * -1);
|
|
45
45
|
}
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
*********************/
|
|
4
4
|
@utility im-* {
|
|
5
5
|
& > * {
|
|
6
|
-
margin:
|
|
6
|
+
margin: --spacing(--value(integer));
|
|
7
7
|
margin: calc(--value([length]));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
@utility im-x-* {
|
|
12
|
-
margin-inline:
|
|
12
|
+
margin-inline: --spacing(--value(integer));
|
|
13
13
|
margin-inline: calc(--value([length]));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@utility im-y-* {
|
|
17
|
-
margin-block:
|
|
17
|
+
margin-block: --spacing(--value(integer));
|
|
18
18
|
margin-block: calc(--value([length]));
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
*********************/
|
|
24
24
|
@utility ip-* {
|
|
25
25
|
& > * {
|
|
26
|
-
padding:
|
|
26
|
+
padding: --spacing(--value(integer));
|
|
27
27
|
padding: calc(--value([length]));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
@utility ip-x-* {
|
|
32
|
-
padding-inline:
|
|
32
|
+
padding-inline: --spacing(--value(integer));
|
|
33
33
|
padding-inline: calc(--value([length]));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
@utility ip-y-* {
|
|
37
|
-
padding-block:
|
|
37
|
+
padding-block: --spacing(--value(integer));
|
|
38
38
|
padding-block: calc(--value([length]));
|
|
39
39
|
}
|
|
@@ -75,17 +75,17 @@
|
|
|
75
75
|
*********************/
|
|
76
76
|
@utility nudge-* {
|
|
77
77
|
--nudge: --value([*]);
|
|
78
|
-
--nudge:
|
|
78
|
+
--nudge: --spacing(--value());
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
@utility nudge-x-* {
|
|
82
82
|
--nudge-x: --value([*]);
|
|
83
|
-
--nudge-x:
|
|
83
|
+
--nudge-x: --spacing(--value());
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
@utility nudge-y-* {
|
|
87
87
|
--nudge-y: --value([*]);
|
|
88
|
-
--nudge-y:
|
|
88
|
+
--nudge-y: --spacing(--value());
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
@utility inner-radius {
|
package/src/tools/color.css
CHANGED
package/src/tools/interact.css
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
&:hover,
|
|
3
3
|
&:focus-visible,
|
|
4
4
|
&:active,
|
|
5
|
+
&.selected,
|
|
6
|
+
&.checked,
|
|
5
7
|
&[aria-current],
|
|
6
8
|
&[aria-selected='true'],
|
|
7
9
|
&[aria-pressed='true'],
|
|
@@ -12,18 +14,15 @@
|
|
|
12
14
|
|
|
13
15
|
@custom-variant interact-within {
|
|
14
16
|
&:hover,
|
|
15
|
-
&:focus-
|
|
16
|
-
&[aria-current],
|
|
17
|
-
&[aria-selected='true'],
|
|
18
|
-
&[aria-pressed='true'],
|
|
19
|
-
&[aria-expanded='true'],
|
|
20
|
-
&:has(:focus-visible),
|
|
17
|
+
&:focus-within,
|
|
21
18
|
&:has(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
.selected,
|
|
20
|
+
.checked,
|
|
21
|
+
[aria-current],
|
|
22
|
+
[aria-selected='true'],
|
|
23
|
+
[aria-pressed='true'],
|
|
24
|
+
[aria-expanded='true']
|
|
25
|
+
) {
|
|
27
26
|
@slot;
|
|
28
27
|
}
|
|
29
28
|
}
|
package/src/tools/outlines.css
CHANGED
|
@@ -4,29 +4,26 @@
|
|
|
4
4
|
*********************/
|
|
5
5
|
|
|
6
6
|
@utility outline-scaffold {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
outline-offset: var(--outline-offset);
|
|
7
|
+
outline: var(--outline-width) var(--outline-style)
|
|
8
|
+
var(--outline-color, transparent);
|
|
9
|
+
outline-offset: var(--outline-offset);
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
11
|
+
&:focus-visible {
|
|
12
|
+
outline-color: var(--outline-focus-color);
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
@utility focus-within {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
outline-offset: var(--outline-offset);
|
|
17
|
+
outline: var(--outline-width) var(--outline-style) transparent;
|
|
18
|
+
outline-offset: var(--outline-offset);
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
&:focus-within {
|
|
21
|
+
outline-color: var(--outline-focus-color);
|
|
22
|
+
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
/* Removes all outlines within the element */
|
|
25
|
+
* {
|
|
26
|
+
--outline-focus-color: transparent;
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
29
|
|
|
@@ -37,9 +34,7 @@
|
|
|
37
34
|
- content-box is necessary, if not present, box will be cut on the right side
|
|
38
35
|
*********************/
|
|
39
36
|
@utility preserve-outlines {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
padding: calc(var(--outline-width));
|
|
44
|
-
}
|
|
37
|
+
box-sizing: content-box;
|
|
38
|
+
margin: calc(var(--outline-width) * -1);
|
|
39
|
+
padding: calc(var(--outline-width));
|
|
45
40
|
}
|
package/src/tools/pigment.css
CHANGED
|
@@ -30,27 +30,23 @@ Usage with the Fill System
|
|
|
30
30
|
* Pigment scaffolds *
|
|
31
31
|
*********************/
|
|
32
32
|
@utility pigment-scaffold {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
background: var(--_bgc);
|
|
41
|
-
}
|
|
33
|
+
@apply transition-scaffold;
|
|
34
|
+
--_bgc: var(--bg-color);
|
|
35
|
+
--_tc: var(--text-color, currentcolor);
|
|
36
|
+
--_bc: var(--border-color, currentcolor);
|
|
37
|
+
border-color: var(--_bc, currentcolor);
|
|
38
|
+
color: var(--_tc);
|
|
39
|
+
background: var(--_bgc);
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
@utility pigment-svg-scaffold {
|
|
45
43
|
--_fc: var(--fill-color);
|
|
46
44
|
--_sc: var(--stroke-color, var(--text-color, currentcolor));
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
stroke: var(--_sc, currentcolor);
|
|
53
|
-
}
|
|
46
|
+
:where(svg path) {
|
|
47
|
+
@apply transition-scaffold;
|
|
48
|
+
fill: var(--_fc, revert-layer);
|
|
49
|
+
stroke: var(--_sc, currentcolor);
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
52
|
|