gerillass 2.1.0 → 2.2.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/README.md +23 -0
- package/SKILL.md +57 -5
- package/gerillass.json +315 -66
- package/package.json +1 -1
- package/scss/library/_after.scss +15 -0
- package/scss/library/_all-text-inputs.scss +1 -1
- package/scss/library/_background-dots.scss +55 -9
- package/scss/library/_background-image.scss +31 -5
- package/scss/library/_background-stripes.scss +43 -4
- package/scss/library/_before.scss +15 -0
- package/scss/library/_border-radius.scss +25 -1
- package/scss/library/_brand-logo.scss +24 -1
- package/scss/library/_breakpoint.scss +34 -0
- package/scss/library/_container-query.scss +73 -1
- package/scss/library/_counter.scss +24 -2
- package/scss/library/_focus-ring.scss +34 -0
- package/scss/library/_font-face.scss +61 -3
- package/scss/library/_index.scss +3 -0
- package/scss/library/_line-clamp.scss +14 -1
- package/scss/library/_loadify.scss +7 -0
- package/scss/library/_motion-safe.scss +28 -0
- package/scss/library/_remove.scss +4 -1
- package/scss/library/_reset-css.scss +7 -5
- package/scss/library/_screen-agent.scss +27 -0
- package/scss/library/_text-image.scss +24 -1
- package/scss/library/_tokens.scss +111 -0
- package/scss/library/_triangle.scss +109 -9
- package/scss/utilities/_clear-unit.scss +4 -0
- package/scss/utilities/_convert-to-em.scss +6 -0
- package/scss/utilities/_convert-to-number.scss +15 -0
- package/scss/utilities/_font-sizer.scss +14 -0
- package/scss/utilities/_remify.scss +7 -0
- package/scss/utilities/_validate-length.scss +7 -0
- package/scss/utilities/_validate-ratio.scss +25 -2
package/gerillass.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gerillass",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Gerillass is an open-source toolkit that contains a set of Sass mixins to help designers and developers to create better, faster and consistent user interfaces.",
|
|
5
5
|
"homepage": "https://gerillass.com",
|
|
6
6
|
"documentation": "https://docs.gerillass.com",
|
|
@@ -42,17 +42,23 @@
|
|
|
42
42
|
"accepts": [
|
|
43
43
|
"a string used as the content value",
|
|
44
44
|
"a data- attribute name, rendered as attr()",
|
|
45
|
-
"null to write content yourself"
|
|
45
|
+
"null to write content yourself",
|
|
46
|
+
"var(), attr(), counter() or counters(), written as they are"
|
|
46
47
|
]
|
|
47
48
|
}
|
|
48
49
|
],
|
|
49
50
|
"file": "scss/library/_after.scss",
|
|
50
51
|
"signature": "after($content: null)",
|
|
51
52
|
"summary": "Styles the ::after pseudo-element. A `data-` argument becomes an attr() content value.",
|
|
53
|
+
"caveats": [
|
|
54
|
+
"With no argument no `content` is emitted, so the pseudo-element does not render unless the block sets `content`. Pass `\"\"` for an empty one."
|
|
55
|
+
],
|
|
52
56
|
"examples": [
|
|
53
57
|
".a { @include after(\"→\") { color: red; } }",
|
|
54
58
|
".a { @include after(\"data-label\") { color: red; } }",
|
|
55
|
-
".a { @include after { content: \"x\"; } }"
|
|
59
|
+
".a { @include after { content: \"x\"; } }",
|
|
60
|
+
".a { @include after(var(--label)) { color: red; } }",
|
|
61
|
+
".a { @include after(attr(data-label)) { color: red; } }"
|
|
56
62
|
],
|
|
57
63
|
"rejects": [
|
|
58
64
|
".a { @include after(42) { color: red; } }",
|
|
@@ -100,6 +106,8 @@
|
|
|
100
106
|
"invalid",
|
|
101
107
|
"required",
|
|
102
108
|
"disabled",
|
|
109
|
+
"focus-visible",
|
|
110
|
+
"user-invalid",
|
|
103
111
|
"null for the plain state"
|
|
104
112
|
]
|
|
105
113
|
}
|
|
@@ -109,7 +117,9 @@
|
|
|
109
117
|
"summary": "Targets every text-like input at once, optionally in one pseudo-class state.",
|
|
110
118
|
"examples": [
|
|
111
119
|
"@include all-text-inputs { border: 1px solid; }",
|
|
112
|
-
"@include all-text-inputs(\"focus\") { outline: 2px solid; }"
|
|
120
|
+
"@include all-text-inputs(\"focus\") { outline: 2px solid; }",
|
|
121
|
+
"@include all-text-inputs(\"focus-visible\") { outline: 2px solid; }",
|
|
122
|
+
"@include all-text-inputs(\"user-invalid\") { border-color: crimson; }"
|
|
113
123
|
],
|
|
114
124
|
"rejects": [
|
|
115
125
|
"@include all-text-inputs(nonsense) { color: red; }"
|
|
@@ -151,7 +161,8 @@
|
|
|
151
161
|
"a slash separated string, such as \"16/9\"",
|
|
152
162
|
"a colon separated string, such as \"16:9\"",
|
|
153
163
|
"a number, where 1.5 means 1.5 / 1",
|
|
154
|
-
"null for the 16/9 default"
|
|
164
|
+
"null for the 16/9 default",
|
|
165
|
+
"var(), written as it is"
|
|
155
166
|
]
|
|
156
167
|
},
|
|
157
168
|
{
|
|
@@ -170,17 +181,22 @@
|
|
|
170
181
|
"file": "scss/library/_aspect-ratio.scss",
|
|
171
182
|
"signature": "aspect-ratio($ratio: null, $fit: cover)",
|
|
172
183
|
"summary": "Holds an element to a ratio and adds what CSS aspect-ratio alone leaves out: object-fit so an image is cropped rather than stretched, and border: 0 so an iframe does not overflow its container by 4px. Apply it to the element itself, not to a wrapper.",
|
|
184
|
+
"caveats": [
|
|
185
|
+
"On an element with a `height` attribute, such as `<img width=\"1600\" height=\"900\">` or an embed code's `<iframe>`, the attribute height wins and the ratio is ignored. Write `height: auto` after the include."
|
|
186
|
+
],
|
|
173
187
|
"examples": [
|
|
174
188
|
".thumb { @include aspect-ratio(\"16:9\"); }",
|
|
175
189
|
".video { @include aspect-ratio(\"16/9\"); }",
|
|
176
190
|
".tile { @include aspect-ratio(\"1:1\", contain); }",
|
|
177
191
|
".plain { @include aspect-ratio(1.5, null); }",
|
|
178
|
-
".default { @include aspect-ratio; }"
|
|
192
|
+
".default { @include aspect-ratio; }",
|
|
193
|
+
".a { @include aspect-ratio(var(--ratio)); }"
|
|
179
194
|
],
|
|
180
195
|
"rejects": [
|
|
181
196
|
".thumb { @include aspect-ratio(\"16:9\", nonsense); }",
|
|
182
197
|
".thumb { @include aspect-ratio(16 9); }",
|
|
183
|
-
".thumb { @include aspect-ratio(\"sixteen/nine\"); }"
|
|
198
|
+
".thumb { @include aspect-ratio(\"sixteen/nine\"); }",
|
|
199
|
+
".a { @include aspect-ratio(url(a.png)); }"
|
|
184
200
|
]
|
|
185
201
|
},
|
|
186
202
|
{
|
|
@@ -199,14 +215,15 @@
|
|
|
199
215
|
"name": "$size",
|
|
200
216
|
"default": "1em",
|
|
201
217
|
"accepts": [
|
|
202
|
-
"dot radius"
|
|
218
|
+
"dot radius: a length, or var(), env() or a calculation such as calc() or clamp()"
|
|
203
219
|
]
|
|
204
220
|
},
|
|
205
221
|
{
|
|
206
222
|
"name": "$gutter",
|
|
207
|
-
"default": "
|
|
223
|
+
"default": "null",
|
|
208
224
|
"accepts": [
|
|
209
|
-
"spacing between dots"
|
|
225
|
+
"spacing between dots, in the same forms as $size",
|
|
226
|
+
"null, the default, for five times $size"
|
|
210
227
|
]
|
|
211
228
|
},
|
|
212
229
|
{
|
|
@@ -221,21 +238,27 @@
|
|
|
221
238
|
"name": "$image",
|
|
222
239
|
"default": "null",
|
|
223
240
|
"accepts": [
|
|
224
|
-
"an image path to sit behind the dots"
|
|
241
|
+
"an image path to sit behind the dots",
|
|
242
|
+
"var(), url(), image-set() or a gradient, written as they are rather than wrapped in url()"
|
|
225
243
|
]
|
|
226
244
|
}
|
|
227
245
|
],
|
|
228
246
|
"file": "scss/library/_background-dots.scss",
|
|
229
|
-
"signature": "background-dots($color: null, $size: 1em, $gutter:
|
|
247
|
+
"signature": "background-dots($color: null, $size: 1em, $gutter: null, $diagonal: true, $image: null)",
|
|
230
248
|
"summary": "Repeating dot pattern as a background, optionally over an image.",
|
|
231
249
|
"examples": [
|
|
232
250
|
".a { @include background-dots; }",
|
|
233
251
|
".a { @include background-dots(red); }",
|
|
234
|
-
".a { @include background-dots(red, 1em, 5em, false); }"
|
|
252
|
+
".a { @include background-dots(red, 1em, 5em, false); }",
|
|
253
|
+
".a { @include background-dots(red, var(--dot), calc(var(--dot) * 6)); }",
|
|
254
|
+
".a { @include background-dots(red, clamp(2px, 0.5vw, 6px)); }",
|
|
255
|
+
".a { @include background-dots(red, $image: var(--photo)); }"
|
|
235
256
|
],
|
|
236
257
|
"rejects": [
|
|
237
258
|
".a { @include background-dots(red, 1em, 5em, maybe); }",
|
|
238
|
-
".a { @include background-dots(red, 1em, 5em, true, 42); }"
|
|
259
|
+
".a { @include background-dots(red, 1em, 5em, true, 42); }",
|
|
260
|
+
".a { @include background-dots(red, nonsense); }",
|
|
261
|
+
".a { @include background-dots(red, 1em, nonsense); }"
|
|
239
262
|
]
|
|
240
263
|
},
|
|
241
264
|
{
|
|
@@ -247,7 +270,8 @@
|
|
|
247
270
|
"default": "null",
|
|
248
271
|
"accepts": [
|
|
249
272
|
"an image path",
|
|
250
|
-
"null to filter the element itself instead"
|
|
273
|
+
"null to filter the element itself instead",
|
|
274
|
+
"var(), url(), image-set() or a gradient, written as they are rather than wrapped in url()"
|
|
251
275
|
]
|
|
252
276
|
},
|
|
253
277
|
{
|
|
@@ -272,10 +296,14 @@
|
|
|
272
296
|
"examples": [
|
|
273
297
|
".a { @include background-image(\"/img/a.png\"); }",
|
|
274
298
|
".a { @include background-image(\"/img/a.png\", rgba(0,0,0,0.5)); }",
|
|
275
|
-
".a { @include background-image(\"/img/a.png\", (red, blue), \"top\"); }"
|
|
299
|
+
".a { @include background-image(\"/img/a.png\", (red, blue), \"top\"); }",
|
|
300
|
+
".a { @include background-image(var(--hero), rgba(0,0,0,0.5)); }",
|
|
301
|
+
".a { @include background-image(image-set(\"/img/a.png\" 1x, \"/img/a@2x.png\" 2x)); }"
|
|
276
302
|
],
|
|
277
303
|
"rejects": [
|
|
278
|
-
".a { @include background-image(\"/img/a.png\", (red, blue), sideways); }"
|
|
304
|
+
".a { @include background-image(\"/img/a.png\", (red, blue), sideways); }",
|
|
305
|
+
".a { @include background-image(\"/img/a.png\", rgba(0,0,0,0.5), sideways); }",
|
|
306
|
+
".a { @include background-image(null, rgba(0,0,0,0.5), sideways); }"
|
|
279
307
|
]
|
|
280
308
|
},
|
|
281
309
|
{
|
|
@@ -294,7 +322,7 @@
|
|
|
294
322
|
"name": "$thickness",
|
|
295
323
|
"default": "1em",
|
|
296
324
|
"accepts": [
|
|
297
|
-
"stripe thickness"
|
|
325
|
+
"stripe thickness: a length, or var(), env() or a calculation such as calc() or clamp()"
|
|
298
326
|
]
|
|
299
327
|
},
|
|
300
328
|
{
|
|
@@ -308,7 +336,8 @@
|
|
|
308
336
|
"name": "$image",
|
|
309
337
|
"default": "null",
|
|
310
338
|
"accepts": [
|
|
311
|
-
"an image path to sit behind the stripes"
|
|
339
|
+
"an image path to sit behind the stripes",
|
|
340
|
+
"var(), url(), image-set() or a gradient, written as they are rather than wrapped in url()"
|
|
312
341
|
]
|
|
313
342
|
}
|
|
314
343
|
],
|
|
@@ -317,11 +346,14 @@
|
|
|
317
346
|
"summary": "Repeating stripe pattern as a background, optionally over an image.",
|
|
318
347
|
"examples": [
|
|
319
348
|
".a { @include background-stripes; }",
|
|
320
|
-
".a { @include background-stripes(red, 2em, -30deg); }"
|
|
349
|
+
".a { @include background-stripes(red, 2em, -30deg); }",
|
|
350
|
+
".a { @include background-stripes(red blue, var(--stripe)); }",
|
|
351
|
+
".a { @include background-stripes(red, 2em, -30deg, var(--photo)); }"
|
|
321
352
|
],
|
|
322
353
|
"rejects": [
|
|
323
354
|
".a { @include background-stripes(red, 2em, nonsense); }",
|
|
324
|
-
".a { @include background-stripes(red, 2em, -45deg, 42); }"
|
|
355
|
+
".a { @include background-stripes(red, 2em, -45deg, 42); }",
|
|
356
|
+
".a { @include background-stripes(red, nonsense); }"
|
|
325
357
|
]
|
|
326
358
|
},
|
|
327
359
|
{
|
|
@@ -334,16 +366,21 @@
|
|
|
334
366
|
"accepts": [
|
|
335
367
|
"a string used as the content value",
|
|
336
368
|
"a data- attribute name, rendered as attr()",
|
|
337
|
-
"null to write content yourself"
|
|
369
|
+
"null to write content yourself",
|
|
370
|
+
"var(), attr(), counter() or counters(), written as they are"
|
|
338
371
|
]
|
|
339
372
|
}
|
|
340
373
|
],
|
|
341
374
|
"file": "scss/library/_before.scss",
|
|
342
375
|
"signature": "before($content: null)",
|
|
343
376
|
"summary": "Styles the ::before pseudo-element. A `data-` argument becomes an attr() content value.",
|
|
377
|
+
"caveats": [
|
|
378
|
+
"With no argument no `content` is emitted, so the pseudo-element does not render unless the block sets `content`. Pass `\"\"` for an empty one."
|
|
379
|
+
],
|
|
344
380
|
"examples": [
|
|
345
381
|
".a { @include before(\"→\") { color: red; } }",
|
|
346
|
-
".a { @include before(\"data-label\") { color: red; } }"
|
|
382
|
+
".a { @include before(\"data-label\") { color: red; } }",
|
|
383
|
+
".a { @include before(var(--label)) { color: red; } }"
|
|
347
384
|
],
|
|
348
385
|
"rejects": [
|
|
349
386
|
".a { @include before(42) { color: red; } }"
|
|
@@ -384,6 +421,7 @@
|
|
|
384
421
|
"accepts": [
|
|
385
422
|
"one length for every corner",
|
|
386
423
|
"a corner name plus a length",
|
|
424
|
+
"a logical corner or edge plus a length: start-start, start-end, end-start, end-end, inline-start, inline-end, block-start or block-end",
|
|
387
425
|
"four lengths: top-left, top-right, bottom-right, bottom-left"
|
|
388
426
|
]
|
|
389
427
|
}
|
|
@@ -394,7 +432,9 @@
|
|
|
394
432
|
"examples": [
|
|
395
433
|
".a { @include border-radius(8px); }",
|
|
396
434
|
".a { @include border-radius(\"top\", 8px); }",
|
|
397
|
-
".a { @include border-radius(1px, 2px, 3px, 4px); }"
|
|
435
|
+
".a { @include border-radius(1px, 2px, 3px, 4px); }",
|
|
436
|
+
".tab { @include border-radius(\"inline-start\", 8px); }",
|
|
437
|
+
".bubble { @include border-radius(\"end-end\", 12px); }"
|
|
398
438
|
],
|
|
399
439
|
"rejects": [
|
|
400
440
|
".a { @include border-radius(1px, 2px, 3px); }",
|
|
@@ -423,7 +463,8 @@
|
|
|
423
463
|
"name": "$image-url",
|
|
424
464
|
"default": "null",
|
|
425
465
|
"accepts": [
|
|
426
|
-
"an image path"
|
|
466
|
+
"an image path",
|
|
467
|
+
"var(), url(), image-set() or a gradient, written as they are rather than wrapped in url()"
|
|
427
468
|
]
|
|
428
469
|
}
|
|
429
470
|
],
|
|
@@ -431,7 +472,8 @@
|
|
|
431
472
|
"signature": "brand-logo($width, $height, $image-url: null)",
|
|
432
473
|
"summary": "Logo box with an image and an accessible stretched link over it.",
|
|
433
474
|
"examples": [
|
|
434
|
-
".logo { @include brand-logo(120px, 40px, \"/img/logo.svg\"); }"
|
|
475
|
+
".logo { @include brand-logo(120px, 40px, \"/img/logo.svg\"); }",
|
|
476
|
+
".logo { @include brand-logo(120px, 40px, var(--logo)); }"
|
|
435
477
|
],
|
|
436
478
|
"rejects": []
|
|
437
479
|
},
|
|
@@ -443,7 +485,8 @@
|
|
|
443
485
|
"name": "$params",
|
|
444
486
|
"variadic": true,
|
|
445
487
|
"accepts": [
|
|
446
|
-
"one breakpoint name, for exactly that width",
|
|
488
|
+
"one breakpoint name, for exactly that width, which prints a warning: write only instead",
|
|
489
|
+
"only plus a breakpoint, for exactly that width",
|
|
447
490
|
"min or max plus a breakpoint",
|
|
448
491
|
"between plus two breakpoints",
|
|
449
492
|
"a start and an end value"
|
|
@@ -453,12 +496,24 @@
|
|
|
453
496
|
"file": "scss/library/_breakpoint.scss",
|
|
454
497
|
"signature": "breakpoint($params...)",
|
|
455
498
|
"summary": "Media query built from the breakpoint map, or from raw lengths.",
|
|
499
|
+
"caveats": [
|
|
500
|
+
"With one argument the query matches exactly that width, `(width: 768px)`, which is a single pixel, and the mixin prints a warning. Write `only` for that width, or `min`, `max` or a range for anything wider. 3.0.0 will refuse the one-argument form.",
|
|
501
|
+
"Declarations written after the include, in the same rule, are emitted after the `@media` block and win over it. Write them before the include."
|
|
502
|
+
],
|
|
456
503
|
"examples": [
|
|
457
|
-
".a { @include breakpoint(\"medium\") { color: red; } }",
|
|
504
|
+
".a { @include breakpoint(\"only\", \"medium\") { color: red; } }",
|
|
458
505
|
".a { @include breakpoint(\"min\", \"medium\") { color: red; } }",
|
|
459
506
|
".a { @include breakpoint(\"between\", \"medium\" \"large\") { color: red; } }"
|
|
460
507
|
],
|
|
461
|
-
"rejects": [
|
|
508
|
+
"rejects": [
|
|
509
|
+
".a { @include breakpoint(\"between\", \"medium\", \"large\") { color: red; } }",
|
|
510
|
+
".a { @include breakpoint() { color: red; } }",
|
|
511
|
+
".a { @include breakpoint(\"min\", var(--wide)) { color: red; } }",
|
|
512
|
+
".a { @include breakpoint(\"between\", var(--start) \"large\") { color: red; } }"
|
|
513
|
+
],
|
|
514
|
+
"warns": [
|
|
515
|
+
".a { @include breakpoint(\"medium\") { color: red; } }"
|
|
516
|
+
]
|
|
462
517
|
},
|
|
463
518
|
{
|
|
464
519
|
"name": "breakpointer",
|
|
@@ -579,7 +634,7 @@
|
|
|
579
634
|
"name": "$params",
|
|
580
635
|
"variadic": true,
|
|
581
636
|
"accepts": [
|
|
582
|
-
"a size",
|
|
637
|
+
"a size, for exactly that width, which prints a warning: write only instead",
|
|
583
638
|
"two sizes for a range",
|
|
584
639
|
"one of min, max, only or between followed by a size",
|
|
585
640
|
"$name as a keyword, to query one named container"
|
|
@@ -589,9 +644,13 @@
|
|
|
589
644
|
"file": "scss/library/_container-query.scss",
|
|
590
645
|
"signature": "container-query($params...)",
|
|
591
646
|
"summary": "A @container rule, taking the same argument shapes as breakpoint so the two read alike. Sizes may be a key from $map-for-breakpoints or a raw length, and a length is the common case because a container is usually narrower than the viewport. Nothing matches at all unless an ancestor was declared with the container mixin.",
|
|
647
|
+
"caveats": [
|
|
648
|
+
"A size on its own matches exactly that width, `(width: 400px)`, which is a single pixel, and the mixin prints a warning. Write `only` for that width, or `min`, `max` or a range for anything wider. 3.0.0 will refuse the one-argument form."
|
|
649
|
+
],
|
|
592
650
|
"examples": [
|
|
593
651
|
".title { @include container-query(\"min\", 400px) { font-size: 2rem; } }",
|
|
594
652
|
".title { @include container-query(\"max\", 399px) { font-size: 1rem; } }",
|
|
653
|
+
".title { @include container-query(\"only\", 400px) { color: red; } }",
|
|
595
654
|
".title { @include container-query(\"between\", 300px 500px) { color: red; } }",
|
|
596
655
|
".title { @include container-query(300px, 500px) { color: red; } }",
|
|
597
656
|
".title { @include container-query(\"min\", \"medium\") { color: red; } }",
|
|
@@ -599,7 +658,16 @@
|
|
|
599
658
|
],
|
|
600
659
|
"rejects": [
|
|
601
660
|
".title { @include container-query(\"min\", 400px, 800px) { color: red; } }",
|
|
602
|
-
".title { @include container-query(\"min\", 400px, $name: 42) { color: red; } }"
|
|
661
|
+
".title { @include container-query(\"min\", 400px, $name: 42) { color: red; } }",
|
|
662
|
+
".title { @include container-query(\"min\", var(--wide)) { color: red; } }",
|
|
663
|
+
".title { @include container-query(\"min\", 400px, $name: var(--container)) { color: red; } }",
|
|
664
|
+
".title { @include container-query(\"min\", 400px, $name: \"none\") { color: red; } }",
|
|
665
|
+
".title { @include container-query(\"min\", 400px, $name: \"not\") { color: red; } }",
|
|
666
|
+
".title { @include container-query(\"min\", 400px, $name: \"my card\") { color: red; } }",
|
|
667
|
+
".title { @include container-query(\"min\", 400px, $name: \"1card\") { color: red; } }"
|
|
668
|
+
],
|
|
669
|
+
"warns": [
|
|
670
|
+
".title { @include container-query(400px) { color: red; } }"
|
|
603
671
|
]
|
|
604
672
|
},
|
|
605
673
|
{
|
|
@@ -627,6 +695,9 @@
|
|
|
627
695
|
"file": "scss/library/_container.scss",
|
|
628
696
|
"signature": "container($name: null, $type: inline-size)",
|
|
629
697
|
"summary": "Marks an element as a query container, so container-query can ask about its width instead of the viewport's. The rule that asks has to sit on a descendant: an element is never matched by a @container rule reading its own container, and nothing warns you when it is not.",
|
|
698
|
+
"caveats": [
|
|
699
|
+
"An element does not match a `@container` query that reads its own container, and nothing warns. Put the `container-query` on a descendant."
|
|
700
|
+
],
|
|
630
701
|
"examples": [
|
|
631
702
|
".card { @include container(\"card\"); }",
|
|
632
703
|
".panel { @include container; }",
|
|
@@ -647,17 +718,22 @@
|
|
|
647
718
|
"accepts": [
|
|
648
719
|
"a counter style name",
|
|
649
720
|
"a prefix and/or suffix string",
|
|
650
|
-
"a prefix, a counter style and a suffix"
|
|
721
|
+
"a prefix, a counter style and a suffix",
|
|
722
|
+
"var(), attr(), counter() or counters() in place of a prefix or suffix, written as they are"
|
|
651
723
|
]
|
|
652
724
|
}
|
|
653
725
|
],
|
|
654
726
|
"file": "scss/library/_counter.scss",
|
|
655
727
|
"signature": "counter($params...)",
|
|
656
728
|
"summary": "CSS counter for a list, with optional text before and after the number.",
|
|
729
|
+
"caveats": [
|
|
730
|
+
"Numbering restarts on every item, each showing the first number, when the items are size containers (`container-type: inline-size`): containment scopes counters to each item."
|
|
731
|
+
],
|
|
657
732
|
"examples": [
|
|
658
733
|
".list { @include counter(\"decimal\"); }",
|
|
659
734
|
".list { @include counter(\".\"); }",
|
|
660
|
-
".list { @include counter(\"(\", \"decimal\", \")\"); }"
|
|
735
|
+
".list { @include counter(\"(\", \"decimal\", \")\"); }",
|
|
736
|
+
".list { @include counter(var(--prefix), \"decimal\"); }"
|
|
661
737
|
],
|
|
662
738
|
"rejects": []
|
|
663
739
|
},
|
|
@@ -738,6 +814,43 @@
|
|
|
738
814
|
".a { @include except(#ff0000) { margin: 0; } }"
|
|
739
815
|
]
|
|
740
816
|
},
|
|
817
|
+
{
|
|
818
|
+
"name": "focus-ring",
|
|
819
|
+
"kind": "mixin",
|
|
820
|
+
"arguments": [
|
|
821
|
+
{
|
|
822
|
+
"name": "$width",
|
|
823
|
+
"default": "2px",
|
|
824
|
+
"accepts": [
|
|
825
|
+
"an outline width, such as 2px"
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"name": "$offset",
|
|
830
|
+
"default": "2px",
|
|
831
|
+
"accepts": [
|
|
832
|
+
"a length; negative draws the ring inside the element"
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"name": "$color",
|
|
837
|
+
"default": "currentColor",
|
|
838
|
+
"accepts": [
|
|
839
|
+
"any CSS colour, including currentColor and var()"
|
|
840
|
+
]
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"file": "scss/library/_focus-ring.scss",
|
|
844
|
+
"signature": "focus-ring($width: 2px, $offset: 2px, $color: currentColor)",
|
|
845
|
+
"summary": "Draws a keyboard focus ring with outline on :focus-visible, which survives forced-colors mode where a box-shadow ring disappears.",
|
|
846
|
+
"examples": [
|
|
847
|
+
".button { @include focus-ring; }",
|
|
848
|
+
".card-link { @include focus-ring(3px, 4px, var(--focus)); }"
|
|
849
|
+
],
|
|
850
|
+
"rejects": [
|
|
851
|
+
"@include focus-ring;"
|
|
852
|
+
]
|
|
853
|
+
},
|
|
741
854
|
{
|
|
742
855
|
"name": "font-face",
|
|
743
856
|
"kind": "mixin",
|
|
@@ -776,19 +889,39 @@
|
|
|
776
889
|
"accepts": [
|
|
777
890
|
"any of eot, woff2, woff, ttf, svg"
|
|
778
891
|
]
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "$font-display",
|
|
895
|
+
"default": "null",
|
|
896
|
+
"accepts": [
|
|
897
|
+
"auto, block, swap, fallback or optional",
|
|
898
|
+
"null, the default, to leave font-display out"
|
|
899
|
+
]
|
|
779
900
|
}
|
|
780
901
|
],
|
|
781
902
|
"file": "scss/library/_font-face.scss",
|
|
782
|
-
"signature": "font-face($font-family, $file-path, $font-style: normal, $font-weight: 400, $file-formats: eot woff2 woff ttf svg)",
|
|
903
|
+
"signature": "font-face($font-family, $file-path, $font-style: normal, $font-weight: 400, $file-formats: eot woff2 woff ttf svg, $font-display: null)",
|
|
783
904
|
"summary": "Emits an @font-face rule for one family across several file formats. Must be called at the root.",
|
|
784
905
|
"examples": [
|
|
785
906
|
"@include font-face(\"Inter\", \"/fonts/inter\");",
|
|
786
|
-
"@include font-face(\"Inter\", \"/fonts/inter\", italic, 700, woff2 woff);"
|
|
907
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", italic, 700, woff2 woff);",
|
|
908
|
+
"@include font-face(\"Readex Pro\", \"/fonts/readex\", $font-weight: 160 700, $file-formats: woff2, $font-display: swap);",
|
|
909
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", \"italic\", $font-weight: \"bold\", $file-formats: woff2);"
|
|
787
910
|
],
|
|
788
911
|
"rejects": [
|
|
789
912
|
".a { @include font-face(\"Inter\", \"/fonts/inter\"); }",
|
|
790
913
|
"@include font-face(42, \"/fonts/x\");",
|
|
791
|
-
"@include font-face(\"Inter\", 42);"
|
|
914
|
+
"@include font-face(\"Inter\", 42);",
|
|
915
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $file-formats: otf);",
|
|
916
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $file-formats: woff2 wof);",
|
|
917
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $file-formats: null);",
|
|
918
|
+
"@include font-face(\"Inter\", var(--font-path));",
|
|
919
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $file-formats: woff2, $font-display: fast);",
|
|
920
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $file-formats: woff2, $font-display: var(--display));",
|
|
921
|
+
"@include font-face(var(--font-family), \"/fonts/inter\", $file-formats: woff2);",
|
|
922
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", var(--font-style), $file-formats: woff2);",
|
|
923
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $font-weight: var(--font-weight), $file-formats: woff2);",
|
|
924
|
+
"@include font-face(\"Inter\", \"/fonts/inter\", $font-weight: 100 var(--max-weight), $file-formats: woff2);"
|
|
792
925
|
]
|
|
793
926
|
},
|
|
794
927
|
{
|
|
@@ -824,7 +957,8 @@
|
|
|
824
957
|
"default": "3",
|
|
825
958
|
"accepts": [
|
|
826
959
|
"a whole number of lines, at least 1",
|
|
827
|
-
"none, to undo a clamp"
|
|
960
|
+
"none, to undo a clamp",
|
|
961
|
+
"var(), written as it is"
|
|
828
962
|
]
|
|
829
963
|
}
|
|
830
964
|
],
|
|
@@ -835,13 +969,15 @@
|
|
|
835
969
|
".excerpt { @include line-clamp(3); }",
|
|
836
970
|
".title { @include line-clamp(2); }",
|
|
837
971
|
".full { @include line-clamp(none); }",
|
|
838
|
-
".default { @include line-clamp; }"
|
|
972
|
+
".default { @include line-clamp; }",
|
|
973
|
+
".a { @include line-clamp(var(--lines)); }"
|
|
839
974
|
],
|
|
840
975
|
"rejects": [
|
|
841
976
|
".a { @include line-clamp(0); }",
|
|
842
977
|
".a { @include line-clamp(2.5); }",
|
|
843
978
|
".a { @include line-clamp(3px); }",
|
|
844
|
-
".a { @include line-clamp(\"three\"); }"
|
|
979
|
+
".a { @include line-clamp(\"three\"); }",
|
|
980
|
+
".a { @include line-clamp(url(a.png)); }"
|
|
845
981
|
]
|
|
846
982
|
},
|
|
847
983
|
{
|
|
@@ -892,6 +1028,9 @@
|
|
|
892
1028
|
"file": "scss/library/_loadify.scss",
|
|
893
1029
|
"signature": "loadify($params...)",
|
|
894
1030
|
"summary": "Fades elements in on page load. Call once at the root to set up, then on each element. Under prefers-reduced-motion: reduce the end state is applied directly and no animation runs. Switching the animation off alone would not do, because the element starts invisible and the animation is what reveals it, so the content would stay hidden for good.",
|
|
1031
|
+
"caveats": [
|
|
1032
|
+
"`init` and every call must be in the same module, or the module with the call must `@use` the one that calls `init`. Otherwise Sass fails with \"The target selector was not found\"."
|
|
1033
|
+
],
|
|
895
1034
|
"examples": [
|
|
896
1035
|
"@include loadify(init);\n.a { @include loadify; }",
|
|
897
1036
|
"@include loadify;\n.a { @include loadify(0.4s, 1s); }"
|
|
@@ -900,6 +1039,24 @@
|
|
|
900
1039
|
"@include loadify(nonsense);"
|
|
901
1040
|
]
|
|
902
1041
|
},
|
|
1042
|
+
{
|
|
1043
|
+
"name": "motion-safe",
|
|
1044
|
+
"kind": "mixin",
|
|
1045
|
+
"arguments": [],
|
|
1046
|
+
"file": "scss/library/_motion-safe.scss",
|
|
1047
|
+
"signature": "motion-safe",
|
|
1048
|
+
"summary": "Wraps its content in @media (prefers-reduced-motion: no-preference), so motion is opt-in: a user who asked their system for less motion gets none of it.",
|
|
1049
|
+
"caveats": [
|
|
1050
|
+
"Keep the resting state outside the block. An element hidden in its base rule and revealed by an animation inside the block stays hidden for a user who asked for less motion; put the start state in the keyframes instead."
|
|
1051
|
+
],
|
|
1052
|
+
"examples": [
|
|
1053
|
+
".card { @include motion-safe { transition: transform 0.2s ease; } }",
|
|
1054
|
+
"@include motion-safe { .spinner { animation: spin 1s linear infinite; } }"
|
|
1055
|
+
],
|
|
1056
|
+
"rejects": [
|
|
1057
|
+
".card { @include motion-safe; }"
|
|
1058
|
+
]
|
|
1059
|
+
},
|
|
903
1060
|
{
|
|
904
1061
|
"name": "only",
|
|
905
1062
|
"kind": "mixin",
|
|
@@ -966,7 +1123,8 @@
|
|
|
966
1123
|
"name": "$offsets",
|
|
967
1124
|
"default": "0",
|
|
968
1125
|
"accepts": [
|
|
969
|
-
"one to four lengths in shorthand order, or auto/inherit/initial/0"
|
|
1126
|
+
"one to four lengths in shorthand order, or auto/inherit/initial/0",
|
|
1127
|
+
"null in any position to leave that edge out"
|
|
970
1128
|
]
|
|
971
1129
|
}
|
|
972
1130
|
],
|
|
@@ -975,7 +1133,9 @@
|
|
|
975
1133
|
"summary": "Sets position and offsets in one call, using shorthand order.",
|
|
976
1134
|
"examples": [
|
|
977
1135
|
".a { @include position(absolute, 0); }",
|
|
978
|
-
".a { @include position(fixed, 0 10px); }"
|
|
1136
|
+
".a { @include position(fixed, 0 10px); }",
|
|
1137
|
+
".a { @include position(absolute, null 16px 16px 16px); }",
|
|
1138
|
+
".a { @include position(absolute, 0 null null 0); }"
|
|
979
1139
|
],
|
|
980
1140
|
"rejects": []
|
|
981
1141
|
},
|
|
@@ -1026,7 +1186,8 @@
|
|
|
1026
1186
|
"variadic": true,
|
|
1027
1187
|
"accepts": [
|
|
1028
1188
|
"nothing, to hide it always",
|
|
1029
|
-
"one breakpoint",
|
|
1189
|
+
"one breakpoint, for exactly that width and no other, which prints a warning: write only instead",
|
|
1190
|
+
"only plus a breakpoint, for exactly that width",
|
|
1030
1191
|
"min or max plus a breakpoint",
|
|
1031
1192
|
"a start and an end breakpoint"
|
|
1032
1193
|
]
|
|
@@ -1034,14 +1195,24 @@
|
|
|
1034
1195
|
],
|
|
1035
1196
|
"file": "scss/library/_remove.scss",
|
|
1036
1197
|
"signature": "remove($params...)",
|
|
1037
|
-
"summary": "Hides an element outright, or
|
|
1198
|
+
"summary": "Hides an element outright, or within a media query: from a breakpoint up with min, up to it with max, or between two breakpoints. One breakpoint on its own hides the element at exactly that width, a single pixel, and prints a warning: pass only for that.",
|
|
1199
|
+
"caveats": [
|
|
1200
|
+
"With one argument the element is hidden at exactly that width, `(width: 768px)`, which is a single pixel, and the mixin prints a warning. Write `only` for that width, or `min`, `max` or a range for anything wider. 3.0.0 will refuse the one-argument form.",
|
|
1201
|
+
"A `display` written after the include, in the same rule, is emitted after the `@media` block and wins over it. Write it before the include."
|
|
1202
|
+
],
|
|
1038
1203
|
"examples": [
|
|
1039
1204
|
".a { @include remove; }",
|
|
1040
|
-
".a { @include remove(\"medium\"); }",
|
|
1041
|
-
".a { @include remove(\"
|
|
1205
|
+
".a { @include remove(\"min\", \"medium\"); }",
|
|
1206
|
+
".a { @include remove(\"max\", \"medium\"); }",
|
|
1207
|
+
".a { @include remove(\"only\", \"medium\"); }",
|
|
1208
|
+
".a { @include remove(\"small\", \"large\"); }"
|
|
1042
1209
|
],
|
|
1043
1210
|
"rejects": [
|
|
1044
|
-
".a { @include remove(a, b, c); }"
|
|
1211
|
+
".a { @include remove(a, b, c); }",
|
|
1212
|
+
".a { @include remove(\"max\", var(--narrow)); }"
|
|
1213
|
+
],
|
|
1214
|
+
"warns": [
|
|
1215
|
+
".a { @include remove(\"medium\"); }"
|
|
1045
1216
|
]
|
|
1046
1217
|
},
|
|
1047
1218
|
{
|
|
@@ -1154,7 +1325,9 @@
|
|
|
1154
1325
|
"examples": [
|
|
1155
1326
|
".a { @include screen-agent(\"2x\") { background-image: url(\"/img/a@2x.png\"); } }"
|
|
1156
1327
|
],
|
|
1157
|
-
"rejects": [
|
|
1328
|
+
"rejects": [
|
|
1329
|
+
".a { @include screen-agent(var(--density)) { color: red; } }"
|
|
1330
|
+
]
|
|
1158
1331
|
},
|
|
1159
1332
|
{
|
|
1160
1333
|
"name": "sizer",
|
|
@@ -1337,7 +1510,8 @@
|
|
|
1337
1510
|
"name": "$image",
|
|
1338
1511
|
"default": "null",
|
|
1339
1512
|
"accepts": [
|
|
1340
|
-
"an image path"
|
|
1513
|
+
"an image path",
|
|
1514
|
+
"var(), url(), image-set() or a gradient, written as they are rather than wrapped in url()"
|
|
1341
1515
|
]
|
|
1342
1516
|
}
|
|
1343
1517
|
],
|
|
@@ -1345,7 +1519,8 @@
|
|
|
1345
1519
|
"signature": "text-image($image: null)",
|
|
1346
1520
|
"summary": "Fills the text with an image via background-clip.",
|
|
1347
1521
|
"examples": [
|
|
1348
|
-
".a { @include text-image(\"/img/t.png\"); }"
|
|
1522
|
+
".a { @include text-image(\"/img/t.png\"); }",
|
|
1523
|
+
".a { @include text-image(var(--texture)); }"
|
|
1349
1524
|
],
|
|
1350
1525
|
"rejects": []
|
|
1351
1526
|
},
|
|
@@ -1438,6 +1613,48 @@
|
|
|
1438
1613
|
],
|
|
1439
1614
|
"rejects": []
|
|
1440
1615
|
},
|
|
1616
|
+
{
|
|
1617
|
+
"name": "tokens",
|
|
1618
|
+
"kind": "mixin",
|
|
1619
|
+
"arguments": [
|
|
1620
|
+
{
|
|
1621
|
+
"name": "$map",
|
|
1622
|
+
"required": true,
|
|
1623
|
+
"accepts": [
|
|
1624
|
+
"a map of names to values, where a value is any CSS value: a colour, a length, a font stack, a shadow, a duration, calc() or clamp()",
|
|
1625
|
+
"a value of null, which is skipped",
|
|
1626
|
+
"a value that references another token, such as var(--blue-500)"
|
|
1627
|
+
]
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
"name": "$prefix",
|
|
1631
|
+
"default": "null",
|
|
1632
|
+
"accepts": [
|
|
1633
|
+
"null, the default, for no prefix",
|
|
1634
|
+
"a name, joined to each property name with a hyphen"
|
|
1635
|
+
]
|
|
1636
|
+
}
|
|
1637
|
+
],
|
|
1638
|
+
"file": "scss/library/_tokens.scss",
|
|
1639
|
+
"signature": "tokens($map, $prefix: null)",
|
|
1640
|
+
"summary": "Writes a Sass map out as CSS custom properties, for any kind of token: colours, spacing, sizes, radii, type, shadows, durations. With the prefix space, (4: 1rem) becomes --space-4: 1rem. A null value is skipped, and a quoted string keeps its quotes.",
|
|
1641
|
+
"examples": [
|
|
1642
|
+
":root { @include tokens((1: 0.25rem, 2: 0.5rem, 4: 1rem), space); @include tokens((md: 8px, full: 9999px), radius); }",
|
|
1643
|
+
":root { @include tokens((md: 0 4px 12px rgba(24, 24, 27, 0.08)), shadow); @include tokens((fast: 150ms, ease: cubic-bezier(0.2, 0, 0, 1)), motion); }",
|
|
1644
|
+
":root { @include tokens((bg: #fff, text: #111), color); }",
|
|
1645
|
+
":root { @include tokens((blue-500: #3b82f6, blue-600: #2563eb)); }",
|
|
1646
|
+
":root { @include tokens((red: #ef4444, 500: #3b82f6), blue); }",
|
|
1647
|
+
"[data-theme=\"dark\"] { @include tokens((bg: #09090b, accent: var(--blue-500)), color); }",
|
|
1648
|
+
":root { @include tokens((body: (\"Readex Pro\", sans-serif), label: \"New\", focus: null), font); }"
|
|
1649
|
+
],
|
|
1650
|
+
"rejects": [
|
|
1651
|
+
":root { @include tokens(#fff); }",
|
|
1652
|
+
":root { @include tokens((brand: (500: #3b82f6)), color); }",
|
|
1653
|
+
":root { @include tokens((bg: #fff), (color, text)); }",
|
|
1654
|
+
":root { @include tokens((\"brand color\": #f00)); }",
|
|
1655
|
+
"@include tokens((bg: #fff));"
|
|
1656
|
+
]
|
|
1657
|
+
},
|
|
1441
1658
|
{
|
|
1442
1659
|
"name": "triangle",
|
|
1443
1660
|
"kind": "mixin",
|
|
@@ -1453,21 +1670,25 @@
|
|
|
1453
1670
|
"bottom",
|
|
1454
1671
|
"bottom-left",
|
|
1455
1672
|
"left",
|
|
1456
|
-
"top-left"
|
|
1673
|
+
"top-left",
|
|
1674
|
+
"inline-start, inline-end, block-start or block-end, which follow the writing direction"
|
|
1457
1675
|
]
|
|
1458
1676
|
},
|
|
1459
1677
|
{
|
|
1460
1678
|
"name": "$color",
|
|
1461
1679
|
"default": "black",
|
|
1462
1680
|
"accepts": [
|
|
1463
|
-
"
|
|
1681
|
+
"a Sass colour, such as red, #333 or oklch(70% 0.1 200)",
|
|
1682
|
+
"currentColor",
|
|
1683
|
+
"var(), color-mix() or light-dark(), which CSS resolves"
|
|
1464
1684
|
]
|
|
1465
1685
|
},
|
|
1466
1686
|
{
|
|
1467
1687
|
"name": "$size",
|
|
1468
1688
|
"default": "10px 8px",
|
|
1469
1689
|
"accepts": [
|
|
1470
|
-
"one length, or two lengths as width then height"
|
|
1690
|
+
"one length, or two lengths as width then height",
|
|
1691
|
+
"var(), env() or a calculation in place of any length"
|
|
1471
1692
|
]
|
|
1472
1693
|
}
|
|
1473
1694
|
],
|
|
@@ -1476,11 +1697,19 @@
|
|
|
1476
1697
|
"summary": "Draws a CSS triangle out of borders, pointing in a given direction.",
|
|
1477
1698
|
"examples": [
|
|
1478
1699
|
".caret { @include triangle(\"bottom\", black, 10px 8px); }",
|
|
1479
|
-
".arrow { @include triangle(\"left\", red); }"
|
|
1700
|
+
".arrow { @include triangle(\"left\", red); }",
|
|
1701
|
+
".arrow { @include triangle(\"right\", var(--accent), 6px 8px); }",
|
|
1702
|
+
".arrow { @include triangle(\"right\", currentColor); }",
|
|
1703
|
+
".arrow { @include triangle(\"top\", color-mix(in srgb, red 50%, blue)); }",
|
|
1704
|
+
".arrow { @include triangle(\"bottom\", currentColor, var(--caret-w) var(--caret-h)); }",
|
|
1705
|
+
".next { @include triangle(\"inline-end\", currentColor, 8px 12px); }",
|
|
1706
|
+
".sort { @include triangle(\"block-start\", currentColor); }"
|
|
1480
1707
|
],
|
|
1481
1708
|
"rejects": [
|
|
1482
1709
|
".caret { @include triangle(sideways); }",
|
|
1483
|
-
".caret { @include triangle(\"top\", notacolor); }"
|
|
1710
|
+
".caret { @include triangle(\"top\", notacolor); }",
|
|
1711
|
+
".caret { @include triangle(\"top\", url(a.png)); }",
|
|
1712
|
+
".caret { @include triangle(\"top\", red, nonsense); }"
|
|
1484
1713
|
]
|
|
1485
1714
|
},
|
|
1486
1715
|
{
|
|
@@ -1501,7 +1730,9 @@
|
|
|
1501
1730
|
"examples": [
|
|
1502
1731
|
".a { line-height: clearUnit(24px); }"
|
|
1503
1732
|
],
|
|
1504
|
-
"rejects": [
|
|
1733
|
+
"rejects": [
|
|
1734
|
+
".a { line-height: clearUnit(nonsense); }"
|
|
1735
|
+
]
|
|
1505
1736
|
},
|
|
1506
1737
|
{
|
|
1507
1738
|
"name": "clearWhitespace",
|
|
@@ -1543,7 +1774,10 @@
|
|
|
1543
1774
|
"examples": [
|
|
1544
1775
|
".a { margin: convertToEm(24px); }"
|
|
1545
1776
|
],
|
|
1546
|
-
"rejects": [
|
|
1777
|
+
"rejects": [
|
|
1778
|
+
".a { margin: convertToEm(nonsense); }",
|
|
1779
|
+
".a { margin: convertToEm(24); }"
|
|
1780
|
+
]
|
|
1547
1781
|
},
|
|
1548
1782
|
{
|
|
1549
1783
|
"name": "convertToNumber",
|
|
@@ -1564,7 +1798,9 @@
|
|
|
1564
1798
|
".a { z-index: convertToNumber(\"42\"); }"
|
|
1565
1799
|
],
|
|
1566
1800
|
"rejects": [
|
|
1567
|
-
".a { --x: #{convertToNumber(42)}; }"
|
|
1801
|
+
".a { --x: #{convertToNumber(42)}; }",
|
|
1802
|
+
".a { z-index: convertToNumber(\"4a\"); }",
|
|
1803
|
+
".a { z-index: convertToNumber(\"\"); }"
|
|
1568
1804
|
]
|
|
1569
1805
|
},
|
|
1570
1806
|
{
|
|
@@ -1678,7 +1914,10 @@
|
|
|
1678
1914
|
"examples": [
|
|
1679
1915
|
".a { font-size: fontSizer(16px, 1.5); }"
|
|
1680
1916
|
],
|
|
1681
|
-
"rejects": [
|
|
1917
|
+
"rejects": [
|
|
1918
|
+
".a { font-size: fontSizer(nonsense, 1.5); }",
|
|
1919
|
+
".a { font-size: fontSizer(16px, 1px); }"
|
|
1920
|
+
]
|
|
1682
1921
|
},
|
|
1683
1922
|
{
|
|
1684
1923
|
"name": "fontSource",
|
|
@@ -1893,7 +2132,11 @@
|
|
|
1893
2132
|
"examples": [
|
|
1894
2133
|
".a { font-size: remify(24px); }"
|
|
1895
2134
|
],
|
|
1896
|
-
"rejects": [
|
|
2135
|
+
"rejects": [
|
|
2136
|
+
".a { font-size: remify(nonsense); }",
|
|
2137
|
+
".a { font-size: remify(1.5rem); }",
|
|
2138
|
+
".a { font-size: remify(24); }"
|
|
2139
|
+
]
|
|
1897
2140
|
},
|
|
1898
2141
|
{
|
|
1899
2142
|
"name": "shade",
|
|
@@ -1921,7 +2164,8 @@
|
|
|
1921
2164
|
".a { color: shade(red, 20%); }"
|
|
1922
2165
|
],
|
|
1923
2166
|
"rejects": [
|
|
1924
|
-
".a { color: shade(notacolor, 20%); }"
|
|
2167
|
+
".a { color: shade(notacolor, 20%); }",
|
|
2168
|
+
".a { color: shade(var(--x), 20%); }"
|
|
1925
2169
|
]
|
|
1926
2170
|
},
|
|
1927
2171
|
{
|
|
@@ -1972,7 +2216,8 @@
|
|
|
1972
2216
|
".a { color: tint(red, 20%); }"
|
|
1973
2217
|
],
|
|
1974
2218
|
"rejects": [
|
|
1975
|
-
".a { color: tint(notacolor, 20%); }"
|
|
2219
|
+
".a { color: tint(notacolor, 20%); }",
|
|
2220
|
+
".a { color: tint(var(--x), 20%); }"
|
|
1976
2221
|
]
|
|
1977
2222
|
},
|
|
1978
2223
|
{
|
|
@@ -2003,13 +2248,14 @@
|
|
|
2003
2248
|
"name": "$value",
|
|
2004
2249
|
"required": true,
|
|
2005
2250
|
"accepts": [
|
|
2006
|
-
"a length with a unit, or auto, inherit, initial, 0"
|
|
2251
|
+
"a length with a unit, or auto, inherit, initial, 0",
|
|
2252
|
+
"null, returned as null without a warning"
|
|
2007
2253
|
]
|
|
2008
2254
|
}
|
|
2009
2255
|
],
|
|
2010
2256
|
"file": "scss/utilities/_validate-length.scss",
|
|
2011
2257
|
"signature": "validateLength($value)",
|
|
2012
|
-
"summary": "Returns the value if it is a length or one of auto, inherit, initial, 0.",
|
|
2258
|
+
"summary": "Returns the value if it is a length or one of auto, inherit, initial, 0. Returns null quietly for null, so a caller can skip a value.",
|
|
2013
2259
|
"examples": [
|
|
2014
2260
|
".a { width: validateLength(20px); }"
|
|
2015
2261
|
],
|
|
@@ -2025,7 +2271,8 @@
|
|
|
2025
2271
|
"accepts": [
|
|
2026
2272
|
"a string such as \"16/9\" or \"16:9\"",
|
|
2027
2273
|
"a unitless number",
|
|
2028
|
-
"null for the 16/9 default"
|
|
2274
|
+
"null for the 16/9 default",
|
|
2275
|
+
"var(), returned as it is"
|
|
2029
2276
|
]
|
|
2030
2277
|
}
|
|
2031
2278
|
],
|
|
@@ -2034,10 +2281,12 @@
|
|
|
2034
2281
|
"summary": "Turns an aspect ratio into a value for the CSS aspect-ratio property.",
|
|
2035
2282
|
"examples": [
|
|
2036
2283
|
".a { aspect-ratio: validateRatio(\"16/9\"); }",
|
|
2037
|
-
".a { aspect-ratio: validateRatio(1.5); }"
|
|
2284
|
+
".a { aspect-ratio: validateRatio(1.5); }",
|
|
2285
|
+
".a { aspect-ratio: validateRatio(var(--ratio)); }"
|
|
2038
2286
|
],
|
|
2039
2287
|
"rejects": [
|
|
2040
|
-
".a { aspect-ratio: validateRatio(16 9); }"
|
|
2288
|
+
".a { aspect-ratio: validateRatio(16 9); }",
|
|
2289
|
+
".a { aspect-ratio: validateRatio(\"16 / 9\"); }"
|
|
2041
2290
|
]
|
|
2042
2291
|
},
|
|
2043
2292
|
{
|