-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathgerillass.json
More file actions
2064 lines (2064 loc) · 59 KB
/
Copy pathgerillass.json
File metadata and controls
2064 lines (2064 loc) · 59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"name": "gerillass",
"version": "2.1.0",
"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.",
"homepage": "https://gerillass.com",
"documentation": "https://docs.gerillass.com",
"prefix": "gls-",
"load": {
"packageImporter": "@use \"pkg:gerillass\" as *;",
"bundler": "@use \"gerillass\" as *;",
"loadPath": "@use \"gerillass\" as *; // with loadPaths: [\"node_modules/gerillass/scss\"]"
},
"members": [
{
"name": "adaptive",
"kind": "mixin",
"arguments": [
{
"name": "$gutter",
"default": "30px",
"accepts": [
"a length subtracted from each side at every breakpoint"
]
}
],
"file": "scss/library/_adaptive.scss",
"signature": "adaptive($gutter: 30px)",
"summary": "Centred container whose max-width steps up at every breakpoint.",
"examples": [
".wrap { @include adaptive; }",
".wrap { @include adaptive(16px); }"
],
"rejects": []
},
{
"name": "after",
"kind": "mixin",
"arguments": [
{
"name": "$content",
"default": "null",
"accepts": [
"a string used as the content value",
"a data- attribute name, rendered as attr()",
"null to write content yourself"
]
}
],
"file": "scss/library/_after.scss",
"signature": "after($content: null)",
"summary": "Styles the ::after pseudo-element. A `data-` argument becomes an attr() content value.",
"examples": [
".a { @include after(\"→\") { color: red; } }",
".a { @include after(\"data-label\") { color: red; } }",
".a { @include after { content: \"x\"; } }"
],
"rejects": [
".a { @include after(42) { color: red; } }",
".a { @include after(16 9) { color: red; } }"
]
},
{
"name": "all-buttons",
"kind": "mixin",
"arguments": [
{
"name": "$pseudo",
"default": "null",
"accepts": [
"hover",
"focus",
"active",
"disabled",
"null for the plain state"
]
}
],
"file": "scss/library/_all-buttons.scss",
"signature": "all-buttons($pseudo: null)",
"summary": "Targets every button-like element at once, optionally in one pseudo-class state.",
"examples": [
"@include all-buttons { cursor: pointer; }",
"@include all-buttons(\"hover\") { opacity: 0.8; }"
],
"rejects": [
"@include all-buttons(nonsense) { color: red; }"
]
},
{
"name": "all-text-inputs",
"kind": "mixin",
"arguments": [
{
"name": "$pseudo",
"default": "null",
"accepts": [
"hover",
"focus",
"active",
"invalid",
"required",
"disabled",
"null for the plain state"
]
}
],
"file": "scss/library/_all-text-inputs.scss",
"signature": "all-text-inputs($pseudo: null)",
"summary": "Targets every text-like input at once, optionally in one pseudo-class state.",
"examples": [
"@include all-text-inputs { border: 1px solid; }",
"@include all-text-inputs(\"focus\") { outline: 2px solid; }"
],
"rejects": [
"@include all-text-inputs(nonsense) { color: red; }"
]
},
{
"name": "antialias",
"kind": "mixin",
"arguments": [
{
"name": "$value",
"default": "null",
"accepts": [
"\"only\" inside a selector to affect just that element",
"null for the element and its descendants"
]
}
],
"file": "scss/library/_antialias.scss",
"signature": "antialias($value: null)",
"summary": "Turns on subpixel-antialiased text smoothing.",
"examples": [
"@include antialias;",
".a { @include antialias(\"only\"); }"
],
"rejects": [
"@include antialias(only);",
".a { @include antialias(bogus); }"
]
},
{
"name": "aspect-ratio",
"kind": "mixin",
"arguments": [
{
"name": "$ratio",
"default": "null",
"accepts": [
"a slash separated string, such as \"16/9\"",
"a colon separated string, such as \"16:9\"",
"a number, where 1.5 means 1.5 / 1",
"null for the 16/9 default"
]
},
{
"name": "$fit",
"default": "cover",
"accepts": [
"fill",
"contain",
"cover",
"none",
"scale-down",
"null to leave object-fit alone"
]
}
],
"file": "scss/library/_aspect-ratio.scss",
"signature": "aspect-ratio($ratio: null, $fit: cover)",
"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.",
"examples": [
".thumb { @include aspect-ratio(\"16:9\"); }",
".video { @include aspect-ratio(\"16/9\"); }",
".tile { @include aspect-ratio(\"1:1\", contain); }",
".plain { @include aspect-ratio(1.5, null); }",
".default { @include aspect-ratio; }"
],
"rejects": [
".thumb { @include aspect-ratio(\"16:9\", nonsense); }",
".thumb { @include aspect-ratio(16 9); }",
".thumb { @include aspect-ratio(\"sixteen/nine\"); }"
]
},
{
"name": "background-dots",
"kind": "mixin",
"arguments": [
{
"name": "$color",
"default": "null",
"accepts": [
"one colour, or two for the diagonal variant",
"null for a translucent black"
]
},
{
"name": "$size",
"default": "1em",
"accepts": [
"dot radius"
]
},
{
"name": "$gutter",
"default": "$size * 5",
"accepts": [
"spacing between dots"
]
},
{
"name": "$diagonal",
"default": "true",
"accepts": [
"true",
"false"
]
},
{
"name": "$image",
"default": "null",
"accepts": [
"an image path to sit behind the dots"
]
}
],
"file": "scss/library/_background-dots.scss",
"signature": "background-dots($color: null, $size: 1em, $gutter: $size * 5, $diagonal: true, $image: null)",
"summary": "Repeating dot pattern as a background, optionally over an image.",
"examples": [
".a { @include background-dots; }",
".a { @include background-dots(red); }",
".a { @include background-dots(red, 1em, 5em, false); }"
],
"rejects": [
".a { @include background-dots(red, 1em, 5em, maybe); }",
".a { @include background-dots(red, 1em, 5em, true, 42); }"
]
},
{
"name": "background-image",
"kind": "mixin",
"arguments": [
{
"name": "$image-url",
"default": "null",
"accepts": [
"an image path",
"null to filter the element itself instead"
]
},
{
"name": "$filter-color",
"default": "null",
"accepts": [
"one colour, or several for a gradient"
]
},
{
"name": "$filter-direction",
"default": "null",
"accepts": [
"an angle such as 45deg",
"a direction name such as top or bottom-left"
]
}
],
"file": "scss/library/_background-image.scss",
"signature": "background-image($image-url: null, $filter-color: null, $filter-direction: null)",
"summary": "Background image with an optional colour or gradient filter laid over it.",
"examples": [
".a { @include background-image(\"/img/a.png\"); }",
".a { @include background-image(\"/img/a.png\", rgba(0,0,0,0.5)); }",
".a { @include background-image(\"/img/a.png\", (red, blue), \"top\"); }"
],
"rejects": [
".a { @include background-image(\"/img/a.png\", (red, blue), sideways); }"
]
},
{
"name": "background-stripes",
"kind": "mixin",
"arguments": [
{
"name": "$color",
"default": "null",
"accepts": [
"one colour, or several for a multi-stripe pattern",
"null for a translucent black"
]
},
{
"name": "$thickness",
"default": "1em",
"accepts": [
"stripe thickness"
]
},
{
"name": "$rotation",
"default": "-45deg",
"accepts": [
"an angle; a unitless number is treated as degrees"
]
},
{
"name": "$image",
"default": "null",
"accepts": [
"an image path to sit behind the stripes"
]
}
],
"file": "scss/library/_background-stripes.scss",
"signature": "background-stripes($color: null, $thickness: 1em, $rotation: -45deg, $image: null)",
"summary": "Repeating stripe pattern as a background, optionally over an image.",
"examples": [
".a { @include background-stripes; }",
".a { @include background-stripes(red, 2em, -30deg); }"
],
"rejects": [
".a { @include background-stripes(red, 2em, nonsense); }",
".a { @include background-stripes(red, 2em, -45deg, 42); }"
]
},
{
"name": "before",
"kind": "mixin",
"arguments": [
{
"name": "$content",
"default": "null",
"accepts": [
"a string used as the content value",
"a data- attribute name, rendered as attr()",
"null to write content yourself"
]
}
],
"file": "scss/library/_before.scss",
"signature": "before($content: null)",
"summary": "Styles the ::before pseudo-element. A `data-` argument becomes an attr() content value.",
"examples": [
".a { @include before(\"→\") { color: red; } }",
".a { @include before(\"data-label\") { color: red; } }"
],
"rejects": [
".a { @include before(42) { color: red; } }"
]
},
{
"name": "border-box",
"kind": "mixin",
"arguments": [
{
"name": "$value",
"default": "null",
"accepts": [
"\"only\" inside a selector to affect just that element",
"null for the element and its descendants"
]
}
],
"file": "scss/library/_border-box.scss",
"signature": "border-box($value: null)",
"summary": "Applies box-sizing: border-box.",
"examples": [
"@include border-box;",
".a { @include border-box(\"only\"); }"
],
"rejects": [
"@include border-box(only);",
".a { @include border-box(bogus); }"
]
},
{
"name": "border-radius",
"kind": "mixin",
"arguments": [
{
"name": "$args",
"variadic": true,
"accepts": [
"one length for every corner",
"a corner name plus a length",
"four lengths: top-left, top-right, bottom-right, bottom-left"
]
}
],
"file": "scss/library/_border-radius.scss",
"signature": "border-radius($args...)",
"summary": "Rounds corners, either all of them, one named corner, or all four individually.",
"examples": [
".a { @include border-radius(8px); }",
".a { @include border-radius(\"top\", 8px); }",
".a { @include border-radius(1px, 2px, 3px, 4px); }"
],
"rejects": [
".a { @include border-radius(1px, 2px, 3px); }",
".a { @include border-radius(nonsense, 5px); }"
]
},
{
"name": "brand-logo",
"kind": "mixin",
"arguments": [
{
"name": "$width",
"required": true,
"accepts": [
"a length"
]
},
{
"name": "$height",
"required": true,
"accepts": [
"a length"
]
},
{
"name": "$image-url",
"default": "null",
"accepts": [
"an image path"
]
}
],
"file": "scss/library/_brand-logo.scss",
"signature": "brand-logo($width, $height, $image-url: null)",
"summary": "Logo box with an image and an accessible stretched link over it.",
"examples": [
".logo { @include brand-logo(120px, 40px, \"/img/logo.svg\"); }"
],
"rejects": []
},
{
"name": "breakpoint",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"one breakpoint name, for exactly that width",
"min or max plus a breakpoint",
"between plus two breakpoints",
"a start and an end value"
]
}
],
"file": "scss/library/_breakpoint.scss",
"signature": "breakpoint($params...)",
"summary": "Media query built from the breakpoint map, or from raw lengths.",
"examples": [
".a { @include breakpoint(\"medium\") { color: red; } }",
".a { @include breakpoint(\"min\", \"medium\") { color: red; } }",
".a { @include breakpoint(\"between\", \"medium\" \"large\") { color: red; } }"
],
"rejects": []
},
{
"name": "breakpointer",
"kind": "mixin",
"arguments": [
{
"name": "$selector",
"default": "null",
"accepts": [
"a selector to attach to when called at root",
"null for body"
]
}
],
"file": "scss/library/_breakpointer.scss",
"signature": "breakpointer($selector: null)",
"summary": "Debug helper that prints the active breakpoint name into a pseudo-element.",
"examples": [
"@include breakpointer;",
".a { @include breakpointer; }"
],
"rejects": [
".a { @include breakpointer(42); }"
]
},
{
"name": "center",
"kind": "mixin",
"arguments": [
{
"name": "$axis",
"default": "\"both\"",
"accepts": [
"both",
"horizontal",
"vertical"
]
}
],
"file": "scss/library/_center.scss",
"signature": "center($axis: \"both\")",
"summary": "Absolutely centres an element inside its positioned parent.",
"examples": [
".modal { @include center; }",
".bar { @include center(\"horizontal\"); }"
],
"rejects": [
".modal { @include center(diagonal); }"
]
},
{
"name": "circle",
"kind": "mixin",
"arguments": [
{
"name": "$size",
"required": true,
"accepts": [
"a length used for both width and height"
]
}
],
"file": "scss/library/_circle.scss",
"signature": "circle($size)",
"summary": "Square element with a fully rounded border, i.e. a circle.",
"examples": [
".dot { @include circle(24px); }"
],
"rejects": []
},
{
"name": "clearfix",
"kind": "mixin",
"arguments": [],
"file": "scss/library/_clearfix.scss",
"signature": "clearfix",
"summary": "Clears floated children using an ::after pseudo-element.",
"examples": [
".row { @include clearfix; }"
],
"rejects": []
},
{
"name": "columnizer",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"a column count, which may be a CSS function such as var(--cols)",
"a column count plus a gutter length, which may also be a CSS function",
"a column count plus a boolean fill flag",
"a column count, a gutter and a fill flag"
]
}
],
"file": "scss/library/_columnizer.scss",
"signature": "columnizer($params...)",
"summary": "Flexbox grid of equal columns, with an optional gutter and fill behaviour.",
"examples": [
".grid { @include columnizer(3); }",
".grid { @include columnizer(3, 20px); }",
".grid { @include columnizer(3, 20px, true); }",
".grid { @include columnizer(3, var(--gap)); }",
".grid { @include columnizer(var(--cols)); }"
],
"rejects": [
".grid { @include columnizer(3, 20px, true, 9); }",
".grid { @include columnizer(3, nonsense); }"
]
},
{
"name": "container-query",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"a size",
"two sizes for a range",
"one of min, max, only or between followed by a size",
"$name as a keyword, to query one named container"
]
}
],
"file": "scss/library/_container-query.scss",
"signature": "container-query($params...)",
"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.",
"examples": [
".title { @include container-query(\"min\", 400px) { font-size: 2rem; } }",
".title { @include container-query(\"max\", 399px) { font-size: 1rem; } }",
".title { @include container-query(\"between\", 300px 500px) { color: red; } }",
".title { @include container-query(300px, 500px) { color: red; } }",
".title { @include container-query(\"min\", \"medium\") { color: red; } }",
".title { @include container-query(\"min\", 400px, $name: \"card\") { color: red; } }"
],
"rejects": [
".title { @include container-query(\"min\", 400px, 800px) { color: red; } }",
".title { @include container-query(\"min\", 400px, $name: 42) { color: red; } }"
]
},
{
"name": "container",
"kind": "mixin",
"arguments": [
{
"name": "$name",
"default": "null",
"accepts": [
"a container name as a string, such as \"card\"",
"null for an unnamed container"
]
},
{
"name": "$type",
"default": "inline-size",
"accepts": [
"inline-size",
"size",
"normal"
]
}
],
"file": "scss/library/_container.scss",
"signature": "container($name: null, $type: inline-size)",
"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.",
"examples": [
".card { @include container(\"card\"); }",
".panel { @include container; }",
".panel { @include container(null, size); }"
],
"rejects": [
".card { @include container(\"card\", sideways); }",
".card { @include container(42); }"
]
},
{
"name": "counter",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"a counter style name",
"a prefix and/or suffix string",
"a prefix, a counter style and a suffix"
]
}
],
"file": "scss/library/_counter.scss",
"signature": "counter($params...)",
"summary": "CSS counter for a list, with optional text before and after the number.",
"examples": [
".list { @include counter(\"decimal\"); }",
".list { @include counter(\".\"); }",
".list { @include counter(\"(\", \"decimal\", \")\"); }"
],
"rejects": []
},
{
"name": "ellipsis",
"kind": "mixin",
"arguments": [
{
"name": "$width",
"default": "100%",
"accepts": [
"a max-width"
]
},
{
"name": "$display",
"default": "inline-block",
"accepts": [
"a display value"
]
}
],
"file": "scss/library/_ellipsis.scss",
"signature": "ellipsis($width: 100%, $display: inline-block)",
"summary": "Truncates a single line of text with an ellipsis.",
"examples": [
".a { @include ellipsis; }",
".a { @include ellipsis(200px); }"
],
"rejects": []
},
{
"name": "escape-to-parent",
"kind": "mixin",
"arguments": [
{
"name": "$selector",
"default": "null",
"accepts": [
"a selector to prepend"
]
}
],
"file": "scss/library/_escape-to-parent.scss",
"signature": "escape-to-parent($selector: null)",
"summary": "Re-roots the current selector under another one using @at-root.",
"examples": [
".a { @include escape-to-parent(\".theme-dark\") { color: white; } }"
],
"rejects": [
".a { @include escape-to-parent(42) { color: red; } }"
]
},
{
"name": "except",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"a positive or negative index",
"first, last, odd or even",
"a selector such as .foo",
"several indexes"
]
}
],
"file": "scss/library/_except.scss",
"signature": "except($params...)",
"summary": "Selects every sibling except the ones named.",
"examples": [
".a { @include except(\"first\") { margin: 0; } }",
".a { @include except(2) { margin: 0; } }",
".a { @include except(1, 3) { margin: 0; } }"
],
"rejects": [
".a { @include except(#ff0000) { margin: 0; } }"
]
},
{
"name": "font-face",
"kind": "mixin",
"arguments": [
{
"name": "$font-family",
"required": true,
"accepts": [
"the family name"
]
},
{
"name": "$file-path",
"required": true,
"accepts": [
"path to the files, without an extension"
]
},
{
"name": "$font-style",
"default": "normal",
"accepts": [
"normal, italic or oblique, or a weight number"
]
},
{
"name": "$font-weight",
"default": "400",
"accepts": [
"a weight"
]
},
{
"name": "$file-formats",
"default": "eot woff2 woff ttf svg",
"accepts": [
"any of eot, woff2, woff, ttf, svg"
]
}
],
"file": "scss/library/_font-face.scss",
"signature": "font-face($font-family, $file-path, $font-style: normal, $font-weight: 400, $file-formats: eot woff2 woff ttf svg)",
"summary": "Emits an @font-face rule for one family across several file formats. Must be called at the root.",
"examples": [
"@include font-face(\"Inter\", \"/fonts/inter\");",
"@include font-face(\"Inter\", \"/fonts/inter\", italic, 700, woff2 woff);"
],
"rejects": [
".a { @include font-face(\"Inter\", \"/fonts/inter\"); }",
"@include font-face(42, \"/fonts/x\");",
"@include font-face(\"Inter\", 42);"
]
},
{
"name": "hide",
"kind": "mixin",
"arguments": [
{
"name": "$toggle",
"default": "\"hide\"",
"accepts": [
"hide",
"unhide"
]
}
],
"file": "scss/library/_hide.scss",
"signature": "hide($toggle: \"hide\")",
"summary": "Visually hides an element while keeping it available to screen readers, or reverses that.",
"examples": [
".a { @include hide; }",
".a { @include hide(\"unhide\"); }"
],
"rejects": [
".a { @include hide(nonsense); }"
]
},
{
"name": "line-clamp",
"kind": "mixin",
"arguments": [
{
"name": "$lines",
"default": "3",
"accepts": [
"a whole number of lines, at least 1",
"none, to undo a clamp"
]
}
],
"file": "scss/library/_line-clamp.scss",
"signature": "line-clamp($lines: 3)",
"summary": "Truncates text after a number of lines, where ellipsis truncates one. It emits five declarations rather than one because -webkit-line-clamp does nothing on its own: without display: -webkit-box or without -webkit-box-orient: vertical the text is not clamped at all and nothing warns you, and without overflow: hidden the clamped text spills out below the box. The unprefixed line-clamp is emitted too, for when it becomes Baseline.",
"examples": [
".excerpt { @include line-clamp(3); }",
".title { @include line-clamp(2); }",
".full { @include line-clamp(none); }",
".default { @include line-clamp; }"
],
"rejects": [
".a { @include line-clamp(0); }",
".a { @include line-clamp(2.5); }",
".a { @include line-clamp(3px); }",
".a { @include line-clamp(\"three\"); }"
]
},
{
"name": "linear-gradient",
"kind": "mixin",
"arguments": [
{
"name": "$direction",
"required": true,
"accepts": [
"a direction name such as top or bottom-left",
"an angle such as 45deg"
]
},
{
"name": "$colors",
"required": true,
"accepts": [
"two or more colours"
]
}
],
"file": "scss/library/_linear-gradient.scss",
"signature": "linear-gradient($direction, $colors)",
"summary": "Linear gradient background from a direction name or an angle.",
"examples": [
".a { @include linear-gradient(\"top\", (red, blue)); }",
".a { @include linear-gradient(45deg, (red, blue)); }"
],
"rejects": [
".a { @include linear-gradient(sideways, (red, blue)); }",
".a { @include linear-gradient(true, (red, blue)); }"
]
},
{
"name": "loadify",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"init at the root, or nothing",
"a delay, and optionally a duration, on an element"
]
}
],
"file": "scss/library/_loadify.scss",
"signature": "loadify($params...)",
"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.",
"examples": [
"@include loadify(init);\n.a { @include loadify; }",
"@include loadify;\n.a { @include loadify(0.4s, 1s); }"
],
"rejects": [
"@include loadify(nonsense);"
]
},
{
"name": "only",
"kind": "mixin",
"arguments": [
{
"name": "$params",
"variadic": true,
"accepts": [
"a positive or negative index",
"first, last, odd or even",
"a selector such as .foo",
"several indexes"
]
}
],
"file": "scss/library/_only.scss",
"signature": "only($params...)",
"summary": "Selects only the siblings named.",
"examples": [
".a { @include only(\"first\") { margin: 0; } }",
".a { @include only(-1) { margin: 0; } }",
".a { @include only(1, 3) { margin: 0; } }"
],
"rejects": [
".a { @include only(#ff0000) { margin: 0; } }"
]
},
{
"name": "placeholder-shown",
"kind": "mixin",
"arguments": [],
"file": "scss/library/_placeholder-shown.scss",
"signature": "placeholder-shown",
"summary": "Styles an input while its placeholder is visible.",
"examples": [
".field { @include placeholder-shown { border-color: gray; } }"
],
"rejects": []
},
{
"name": "placeholder",
"kind": "mixin",
"arguments": [],
"file": "scss/library/_placeholder.scss",
"signature": "placeholder",
"summary": "Styles the placeholder text of an input across vendor prefixes.",
"examples": [
".field { @include placeholder { color: gray; } }"
],
"rejects": []
},
{
"name": "position",
"kind": "mixin",
"arguments": [
{
"name": "$position",
"default": "absolute",
"accepts": [
"any CSS position value"
]
},
{
"name": "$offsets",
"default": "0",
"accepts": [
"one to four lengths in shorthand order, or auto/inherit/initial/0"
]
}
],
"file": "scss/library/_position.scss",
"signature": "position($position: absolute, $offsets: 0)",
"summary": "Sets position and offsets in one call, using shorthand order.",
"examples": [
".a { @include position(absolute, 0); }",
".a { @include position(fixed, 0 10px); }"
],
"rejects": []
},
{
"name": "radial-gradient",
"kind": "mixin",
"arguments": [
{
"name": "$shape",
"required": true,
"accepts": [
"circle or ellipse"
]
},
{
"name": "$position",
"required": true,
"accepts": [
"a position name such as center or top-left",
"a raw CSS position"
]
},