@department-of-veterans-affairs/css-library 0.13.1-rc2 → 0.14.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/stylesheets/base/fonts.css +1596 -1
  2. package/dist/stylesheets/base/headings.css +1530 -1
  3. package/dist/stylesheets/base/utils.css +137 -1
  4. package/dist/stylesheets/base/va.css +407 -1
  5. package/dist/stylesheets/core.css +6470 -1
  6. package/dist/stylesheets/formation-overrides/core/base.css +64 -1
  7. package/dist/stylesheets/formation-overrides/core/fonts.css +46 -1
  8. package/dist/stylesheets/formation-overrides/elements/buttons.css +562 -1
  9. package/dist/stylesheets/formation-overrides/elements/inputs.css +384 -1
  10. package/dist/stylesheets/formation-overrides/elements/labels.css +28 -1
  11. package/dist/stylesheets/formation-overrides/elements/lists.css +57 -1
  12. package/dist/stylesheets/formation-overrides/elements/table.css +78 -1
  13. package/dist/stylesheets/formation-overrides/elements/typography.css +312 -1
  14. package/dist/stylesheets/mobile-typography.css +13 -1
  15. package/dist/stylesheets/modules/m-action-link.css +1454 -1
  16. package/dist/stylesheets/modules/m-additional-info.css +39 -1
  17. package/dist/stylesheets/modules/m-alert.css +256 -1
  18. package/dist/stylesheets/modules/m-breadcrumbs.css +96 -1
  19. package/dist/stylesheets/modules/m-button.css +153 -1
  20. package/dist/stylesheets/modules/m-dropdown.css +47 -1
  21. package/dist/stylesheets/modules/m-emergency-banner.css +33 -1
  22. package/dist/stylesheets/modules/m-external-link.css +14 -1
  23. package/dist/stylesheets/modules/m-form-elements.css +231 -1
  24. package/dist/stylesheets/modules/m-form-process.css +219 -1
  25. package/dist/stylesheets/modules/m-homepage-hero.css +76 -1
  26. package/dist/stylesheets/modules/m-hub-page-link-list.css +40 -1
  27. package/dist/stylesheets/modules/m-loading-indicator.css +45 -1
  28. package/dist/stylesheets/modules/m-maintenance-banner.css +33 -1
  29. package/dist/stylesheets/modules/m-megamenu.css +370 -1
  30. package/dist/stylesheets/modules/m-modal.css +121 -1
  31. package/dist/stylesheets/modules/m-nav-linklist.css +49 -1
  32. package/dist/stylesheets/modules/m-nav-sidebar.css +353 -1
  33. package/dist/stylesheets/modules/m-omb-info.css +5 -0
  34. package/dist/stylesheets/modules/m-overlay.css +72 -1
  35. package/dist/stylesheets/modules/m-print.css +27 -1
  36. package/dist/stylesheets/modules/m-process-list.css +162 -1
  37. package/dist/stylesheets/modules/va-pagination.css +90 -1
  38. package/dist/stylesheets/modules/va-tabs.css +53 -1
  39. package/dist/stylesheets/shame.css +267 -1
  40. package/dist/stylesheets/uswds-typography.css +4222 -1
  41. package/dist/stylesheets/utilities.css +15622 -1
  42. package/dist/tokens/css/variables.css +1 -1
  43. package/dist/tokens/scss/variables.scss +1 -1
  44. package/package.json +1 -1
@@ -1 +1,4222 @@
1
- p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}/*# sourceMappingURL=uswds-typography.css.map */
1
+ /*
2
+ * * * * * ==============================
3
+ * * * * * ==============================
4
+ * * * * * ==============================
5
+ * * * * * ==============================
6
+ ========================================
7
+ ========================================
8
+ ========================================
9
+ ----------------------------------------
10
+ GENERAL SETTINGS
11
+ ----------------------------------------
12
+ Read more about settings and
13
+ USWDS style tokens in the documentation:
14
+ https://designsystem.digital.gov/design-tokens
15
+ ----------------------------------------
16
+ */
17
+ /*
18
+ ----------------------------------------
19
+ Image path
20
+ ----------------------------------------
21
+ Relative image file path
22
+ ----------------------------------------
23
+ */
24
+ /*
25
+ ----------------------------------------
26
+ Show compile warnings
27
+ ----------------------------------------
28
+ Show Sass warnings when functions and
29
+ mixins use non-standard tokens.
30
+ AND
31
+ Show updates and notifications.
32
+ ----------------------------------------
33
+ */
34
+ /*
35
+ ----------------------------------------
36
+ Namespace
37
+ ----------------------------------------
38
+ */
39
+ /*
40
+ ----------------------------------------
41
+ Prefix separator
42
+ ----------------------------------------
43
+ Set the character the separates
44
+ responsive and state prefixes from the
45
+ main class name.
46
+ The default (":") needs to be preceded
47
+ by two backslashes to be properly
48
+ escaped.
49
+ ----------------------------------------
50
+ */
51
+ /*
52
+ ----------------------------------------
53
+ Layout grid
54
+ ----------------------------------------
55
+ Should the layout grid classes output
56
+ with !important
57
+ ----------------------------------------
58
+ */
59
+ /*
60
+ ----------------------------------------
61
+ Border box sizing
62
+ ----------------------------------------
63
+ When set to true, sets the box-sizing
64
+ property of all site elements to
65
+ `border-box`.
66
+ ----------------------------------------
67
+ */
68
+ /*
69
+ ----------------------------------------
70
+ Focus styles
71
+ ----------------------------------------
72
+ */
73
+ /*
74
+ ----------------------------------------
75
+ Icons
76
+ ----------------------------------------
77
+ */
78
+ /*
79
+ * * * * * ==============================
80
+ * * * * * ==============================
81
+ * * * * * ==============================
82
+ * * * * * ==============================
83
+ ========================================
84
+ ========================================
85
+ ========================================
86
+ ----------------------------------------
87
+ TYPOGRAPHY SETTINGS
88
+ ----------------------------------------
89
+ Read more about settings and
90
+ USWDS typography tokens in the documentation:
91
+ https://designsystem.digital.gov/design-tokens/typesetting/overview/
92
+ ----------------------------------------
93
+ */
94
+ /*
95
+ ----------------------------------------
96
+ Root font size
97
+ ----------------------------------------
98
+ Setting $theme-respect-user-font-size to
99
+ true sets the root font size to 100% and
100
+ uses ems for media queries
101
+ ----------------------------------------
102
+ $theme-root-font-size only applies when
103
+ $theme-respect-user-font-size is set to
104
+ false.
105
+
106
+ This will set the root font size
107
+ as a specific px value and use px values
108
+ for media queries.
109
+
110
+ Accepts true or false
111
+ ----------------------------------------
112
+ */
113
+ /*
114
+ ----------------------------------------
115
+ Global styles
116
+ ----------------------------------------
117
+ Adds basic styling for the following
118
+ unclassed elements:
119
+
120
+ - paragraph: paragraph text
121
+ - link: links
122
+ - content: paragraph text, links,
123
+ headings, lists, and tables
124
+ ----------------------------------------
125
+ */
126
+ /*
127
+ ----------------------------------------
128
+ Broswer compatibility mode
129
+ ----------------------------------------
130
+ When true, outputs woff and ttf font
131
+ formats in addition to woff2
132
+ ----------------------------------------
133
+ */
134
+ /*
135
+ ----------------------------------------
136
+ Font path
137
+ ----------------------------------------
138
+ Relative font file path
139
+ ----------------------------------------
140
+ */
141
+ /*
142
+ ----------------------------------------
143
+ Custom typeface tokens
144
+ ----------------------------------------
145
+ Add a new custom typeface token if
146
+ your project uses a typeface not already
147
+ defined by USWDS.
148
+ ----------------------------------------
149
+ USWDS defines the following tokens
150
+ by default:
151
+ ----------------------------------------
152
+ 'georgia'
153
+ 'helvetica'
154
+ 'merriweather'
155
+ 'open-sans'
156
+ 'public-sans'
157
+ 'roboto-mono'
158
+ 'source-sans-pro'
159
+ 'system'
160
+ 'tahoma'
161
+ 'verdana'
162
+ ----------------------------------------
163
+ Add as many new tokens as you have
164
+ custom typefaces. Reference your new
165
+ token(s) in the type-based font settings
166
+ using the quoted name of the token.
167
+
168
+ For example:
169
+
170
+ $theme-font-type-cond: 'example-font-token';
171
+
172
+ display-name:
173
+ The display name of your font
174
+
175
+ cap-height:
176
+ The height of a 500px `N` in Sketch
177
+ ----------------------------------------
178
+ You should change `example-[style]-token`
179
+ names to something more descriptive.
180
+ ----------------------------------------
181
+ */
182
+ /*
183
+ ----------------------------------------
184
+ Type-based font settings
185
+ ----------------------------------------
186
+ Set the type-based tokens for your
187
+ project from the following tokens,
188
+ or from any new font tokens you added in
189
+ $theme-typeface-tokens.
190
+ ----------------------------------------
191
+ 'georgia'
192
+ 'helvetica'
193
+ 'merriweather'
194
+ 'open-sans'
195
+ 'public-sans'
196
+ 'roboto-mono'
197
+ 'source-sans-pro'
198
+ 'system'
199
+ 'tahoma'
200
+ 'verdana'
201
+ ----------------------------------------
202
+ */
203
+ /*
204
+ ----------------------------------------
205
+ Custom font stacks
206
+ ----------------------------------------
207
+ Add custom font stacks to any of the
208
+ type-based fonts. Any USWDS typeface
209
+ token already has a default stack.
210
+
211
+ Custom stacks don't need to include the
212
+ font's display name. It will
213
+ automatically appear at the start of
214
+ the stack.
215
+ ----------------------------------------
216
+ Example:
217
+ $theme-font-type-sans: 'source-sans-pro';
218
+ $theme-font-sans-custom-stack: "Helvetica Neue", Helvetica, Arial, sans;
219
+
220
+ Output:
221
+ font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;
222
+ ----------------------------------------
223
+ */
224
+ /*
225
+ ----------------------------------------
226
+ Add any custom font source files
227
+ ----------------------------------------
228
+ If you want USWDS to generate additional
229
+ @font-face declarations, add your font
230
+ data below, following the example that
231
+ follows.
232
+ ----------------------------------------
233
+ USWDS automatically generates @font-face
234
+ declarations for the following
235
+
236
+ 'merriweather'
237
+ 'public-sans'
238
+ 'roboto-mono'
239
+ 'source-sans-pro'
240
+
241
+ These typefaces not require custom
242
+ source files.
243
+ ----------------------------------------
244
+ EXAMPLE
245
+
246
+ - dir:
247
+ Directory relative to $theme-font-path
248
+ - This directory should include fonts saved as
249
+ .woff2
250
+ ExampleSerif-Normal.woff2
251
+
252
+ $theme-font-serif-custom-src: (
253
+ dir: 'custom/example-serif',
254
+ roman: (
255
+ 100: false,
256
+ 200: false,
257
+ 300: 'ExampleSerif-Light',
258
+ 400: 'ExampleSerif-Normal',
259
+ 500: false,
260
+ 600: false,
261
+ 700: 'ExampleSerif-Bold',
262
+ 800: false,
263
+ 900: false,
264
+ ),
265
+ italic: (
266
+ 100: false,
267
+ 200: false,
268
+ 300: 'ExampleSerif-LightItalic',
269
+ 400: 'ExampleSerif-Italic',
270
+ 500: false,
271
+ 600: false,
272
+ 700: 'ExampleSerif-BoldItalic',
273
+ 800: false,
274
+ 900: false,
275
+ ),
276
+ );
277
+ ----------------------------------------
278
+ */
279
+ /*
280
+ ----------------------------------------
281
+ Role-based font settings
282
+ ----------------------------------------
283
+ Set the role-based tokens for your
284
+ project from the following font-type
285
+ tokens.
286
+ ----------------------------------------
287
+ 'cond'
288
+ 'icon'
289
+ 'lang'
290
+ 'mono'
291
+ 'sans'
292
+ 'serif'
293
+ ----------------------------------------
294
+ */
295
+ /*
296
+ ----------------------------------------
297
+ Type scale
298
+ ----------------------------------------
299
+ Define your project's type scale using
300
+ values from the USWDS system type scale
301
+
302
+ 1-20
303
+ ----------------------------------------
304
+ */
305
+ /*
306
+ ----------------------------------------
307
+ Font weights
308
+ ----------------------------------------
309
+ Assign weights 100-900
310
+ Or use `false` for unneeded weights.
311
+ ----------------------------------------
312
+ */
313
+ /*
314
+ ----------------------------------------
315
+ General typography settings
316
+ ----------------------------------------
317
+ Type scale tokens
318
+ ----------------------------------------
319
+ micro: 10px
320
+ 1: 12px
321
+ 2: 13px
322
+ 3: 14px
323
+ 4: 15px
324
+ 5: 16px
325
+ 6: 17px
326
+ 7: 18px
327
+ 8: 20px
328
+ 9: 22px
329
+ 10: 24px
330
+ 11: 28px
331
+ 12: 32px
332
+ 13: 36px
333
+ 14: 40px
334
+ 15: 48px
335
+ 16: 56px
336
+ 17: 64px
337
+ 18: 80px
338
+ 19: 120px
339
+ 20: 140px
340
+ ----------------------------------------
341
+ Line height tokens
342
+ ----------------------------------------
343
+ 1: 1
344
+ 2: 1.15
345
+ 3: 1.35
346
+ 4: 1.5
347
+ 5: 1.62
348
+ 6: 1.75
349
+ ----------------------------------------
350
+ Font role tokens
351
+ ----------------------------------------
352
+ 'ui'
353
+ 'heading'
354
+ 'body'
355
+ 'code'
356
+ 'alt'
357
+ ----------------------------------------
358
+ Measure (max-width) tokens
359
+ ----------------------------------------
360
+ 1: 44ex
361
+ 2: 60ex
362
+ 3: 64ex
363
+ 4: 68ex
364
+ 5: 74ex
365
+ 6: 88ex
366
+ none: none
367
+ ----------------------------------------
368
+ */
369
+ /*
370
+ * * * * * ==============================
371
+ * * * * * ==============================
372
+ * * * * * ==============================
373
+ * * * * * ==============================
374
+ ========================================
375
+ ========================================
376
+ ========================================
377
+ ----------------------------------------
378
+ COLOR SETTINGS
379
+ ----------------------------------------
380
+ Read more about settings and
381
+ USWDS color tokens in the documentation:
382
+ https://designsystem.digital.gov/design-tokens/color
383
+ ----------------------------------------
384
+ */
385
+ /*
386
+ ----------------------------------------
387
+ Theme palette colors
388
+ ----------------------------------------
389
+ */
390
+ /*
391
+ ----------------------------------------
392
+ State palette colors
393
+ ----------------------------------------
394
+ */
395
+ /*
396
+ ----------------------------------------
397
+ General colors
398
+ ----------------------------------------
399
+ */
400
+ /*
401
+ * * * * * ==============================
402
+ * * * * * ==============================
403
+ * * * * * ==============================
404
+ * * * * * ==============================
405
+ ========================================
406
+ ========================================
407
+ ========================================
408
+ ----------------------------------------
409
+ COMPONENT SETTINGS
410
+ ----------------------------------------
411
+ Read more about settings and
412
+ USWDS style tokens in the documentation:
413
+ https://designsystem.digital.gov/design-tokens
414
+ ----------------------------------------
415
+ */
416
+ /*
417
+ * * * * * ==============================
418
+ * * * * * ==============================
419
+ * * * * * ==============================
420
+ * * * * * ==============================
421
+ ========================================
422
+ ========================================
423
+ ========================================
424
+ ----------------------------------------
425
+ SPACING SETTINGS
426
+ ----------------------------------------
427
+ Read more about settings and
428
+ USWDS spacing units tokens in the
429
+ documentation:
430
+ https://designsystem.digital.gov/design-tokens/spacing-units
431
+ ----------------------------------------
432
+ */
433
+ /*
434
+ ----------------------------------------
435
+ Border radius
436
+ ----------------------------------------
437
+ 2px 2px
438
+ 0.5 4px
439
+ 1 8px
440
+ 1.5 12px
441
+ 2 16px
442
+ 2.5 20px
443
+ 3 24px
444
+ 4 32px
445
+ 5 40px
446
+ 6 48px
447
+ 7 56px
448
+ 8 64px
449
+ 9 72px
450
+ ----------------------------------------
451
+ */
452
+ /*
453
+ ----------------------------------------
454
+ Column gap
455
+ ----------------------------------------
456
+ 2px 2px
457
+ 0.5 4px
458
+ 1 8px
459
+ 2 16px
460
+ 3 24px
461
+ 4 32px
462
+ 5 40px
463
+ 6 48px
464
+ ----------------------------------------
465
+ */
466
+ /*
467
+ ----------------------------------------
468
+ Grid container max-width
469
+ ----------------------------------------
470
+ mobile
471
+ mobile-lg
472
+ tablet
473
+ tablet-lg
474
+ desktop
475
+ desktop-lg
476
+ widescreen
477
+ ----------------------------------------
478
+ */
479
+ /*
480
+ ----------------------------------------
481
+ Site
482
+ ----------------------------------------
483
+ */
484
+ /*
485
+ * * * * * ==============================
486
+ * * * * * ==============================
487
+ * * * * * ==============================
488
+ * * * * * ==============================
489
+ ========================================
490
+ ========================================
491
+ ========================================
492
+ ----------------------------------------
493
+ UTILITIES SETTINGS
494
+ ----------------------------------------
495
+ Read more about settings and
496
+ USWDS utilities in the documentation:
497
+ https://designsystem.digital.gov/utilities
498
+ ----------------------------------------
499
+ */
500
+ /*
501
+ ----------------------------------------
502
+ map-collect()
503
+ ----------------------------------------
504
+ Collect multiple maps into a single
505
+ large map
506
+ source: https://gist.github.com/bigglesrocks/d75091700f8f2be5abfe
507
+ ----------------------------------------
508
+ */
509
+ /*
510
+ ----------------------------------------
511
+ Utility breakpoints
512
+ ----------------------------------------
513
+ Which breakpoints does your project
514
+ need? Select as `true` any breakpoint
515
+ used by utilities or layout grid
516
+ ----------------------------------------
517
+ */
518
+ /*
519
+ ----------------------------------------
520
+ Global colors
521
+ ----------------------------------------
522
+ The following palettes will be added to
523
+ - background-color
524
+ - border-color
525
+ - color
526
+ - text-decoration-color
527
+ ----------------------------------------
528
+ */
529
+ /*
530
+ ----------------------------------------
531
+ Settings
532
+ ----------------------------------------
533
+ */
534
+ /*
535
+ ----------------------------------------
536
+ Values
537
+ ----------------------------------------
538
+ */
539
+ /*
540
+ ----------------------------------------
541
+ color()
542
+ ----------------------------------------
543
+ Derive a color from a color shortcode
544
+ ----------------------------------------
545
+ */
546
+ /*
547
+ ----------------------------------------
548
+ append-important()
549
+ ----------------------------------------
550
+ Append `!important` to a list
551
+ ----------------------------------------
552
+ */
553
+ /*
554
+ ----------------------------------------
555
+ get-last()
556
+ ----------------------------------------
557
+ Return the last item of a list,
558
+ Return null if the value is null
559
+ ----------------------------------------
560
+ */
561
+ /*
562
+ ----------------------------------------
563
+ de-list()
564
+ ----------------------------------------
565
+ Transform a one-element list or arglist
566
+ into that single element.
567
+ ----------------------------------------
568
+ (1) => 1
569
+ ((1)) => (1)
570
+ ----------------------------------------
571
+ */
572
+ /*
573
+ ----------------------------------------
574
+ error-not-token()
575
+ ----------------------------------------
576
+ Returns a common not-a-token error.
577
+ ----------------------------------------
578
+ */
579
+ /*
580
+ ----------------------------------------
581
+ uswds-error()
582
+ ----------------------------------------
583
+ Allow the system to pass an error as text
584
+ to test error states in unit testing
585
+ ----------------------------------------
586
+ */
587
+ /*
588
+ ----------------------------------------
589
+ get-default()
590
+ ----------------------------------------
591
+ Returns the default value from a map
592
+ of project defaults
593
+ get-default("bg-color")
594
+ > $theme-body-background-color
595
+ ----------------------------------------
596
+ */
597
+ /*
598
+ ----------------------------------------
599
+ has-important()
600
+ ----------------------------------------
601
+ Check to see if `!important` is
602
+ being passed in a mixin's props
603
+ ----------------------------------------
604
+ */
605
+ /*
606
+ ----------------------------------------
607
+ map-deep-get()
608
+ ----------------------------------------
609
+ @author Hugo Giraudel
610
+ @access public
611
+ @param {Map} $map - Map
612
+ @param {Arglist} $keys - Key chain
613
+ @return {*} - Desired value
614
+ ----------------------------------------
615
+ */
616
+ /*
617
+ ----------------------------------------
618
+ multi-cat()
619
+ ----------------------------------------
620
+ Concatenate two lists
621
+ ----------------------------------------
622
+ */
623
+ /*
624
+ ----------------------------------------
625
+ remove()
626
+ ----------------------------------------
627
+ Remove a value from a list
628
+ ----------------------------------------
629
+ */
630
+ /*
631
+ ----------------------------------------
632
+ smart-quote()
633
+ ----------------------------------------
634
+ Quotes strings
635
+ Inspects `px`, `xs`, and `xl` numbers
636
+ Leaves bools as is
637
+ ----------------------------------------
638
+ */
639
+ /*
640
+ ----------------------------------------
641
+ str-replace()
642
+ ----------------------------------------
643
+ Replace any substring with another
644
+ string
645
+ ----------------------------------------
646
+ */
647
+ /*
648
+ ----------------------------------------
649
+ str-split()
650
+ ----------------------------------------
651
+ Split a string at a given separator
652
+ and convert into a list of substrings
653
+ ----------------------------------------
654
+ */
655
+ /*
656
+ ----------------------------------------
657
+ strip-unit()
658
+ ----------------------------------------
659
+ Remove the unit of a length
660
+ @author Hugo Giraudel
661
+ @param {Number} $number - Number to remove unit from
662
+ @return {Number} - Unitless number
663
+ ----------------------------------------
664
+ */
665
+ /*
666
+ ----------------------------------------
667
+ base-to-map()
668
+ @TODO: Deprecate and delete
669
+ ----------------------------------------
670
+ Convert a single base to a USWDS
671
+ value map.
672
+
673
+ Candidate for deprecation if we remove
674
+ isReadable
675
+ ----------------------------------------
676
+ */
677
+ /*
678
+ ----------------------------------------
679
+ to-number()
680
+ ----------------------------------------
681
+ Casts a string into a number
682
+ ----------------------------------------
683
+ @param {String | Number} $value - Value to be parsed
684
+ @return {Number}
685
+ ----------------------------------------
686
+ */
687
+ /*
688
+ ----------------------------------------
689
+ unpack()
690
+ ----------------------------------------
691
+ Create lists of single items from lists
692
+ of lists.
693
+ ----------------------------------------
694
+ (1, (2.1, 2.2), 3) -->
695
+ (1, 2.1, 2.2, 3)
696
+ ----------------------------------------
697
+ */
698
+ /*
699
+ ----------------------------------------
700
+ color()
701
+ ----------------------------------------
702
+ Derive a color from a color shortcode
703
+ ----------------------------------------
704
+ */
705
+ /*
706
+ ----------------------------------------
707
+ color()
708
+ ----------------------------------------
709
+ Derive a color from a color shortcode
710
+ ----------------------------------------
711
+ */
712
+ /*
713
+ ----------------------------------------
714
+ get-system-color()
715
+ ----------------------------------------
716
+ Derive a system color from its
717
+ family, value, and vivid or a passed
718
+ variable that is, itself, a list
719
+ ----------------------------------------
720
+ */
721
+ /*
722
+ ----------------------------------------
723
+ color()
724
+ ----------------------------------------
725
+ Derive a color from a color shortcode
726
+ ----------------------------------------
727
+ */
728
+ /*
729
+ ----------------------------------------
730
+ color()
731
+ ----------------------------------------
732
+ Derive a color from a color shortcode
733
+ ----------------------------------------
734
+ */
735
+ /*
736
+ ----------------------------------------
737
+ color()
738
+ ----------------------------------------
739
+ Derive a color from a color shortcode
740
+ ----------------------------------------
741
+ */
742
+ /*
743
+ ----------------------------------------
744
+ set-theme-color()
745
+ ----------------------------------------
746
+ Derive a color from a system color token
747
+ or a hex value
748
+ ----------------------------------------
749
+ */
750
+ /*
751
+ ----------------------------------------
752
+ px-to-rem()
753
+ ----------------------------------------
754
+ Converts a value in px to a value in rem
755
+ ----------------------------------------
756
+ */
757
+ /*
758
+ ----------------------------------------
759
+ rem-to-user-em()
760
+ ----------------------------------------
761
+ Converts a value in rem to a value in
762
+ [user-settings] em for use in media
763
+ queries
764
+ ----------------------------------------
765
+ */
766
+ /*
767
+ ----------------------------------------
768
+ px-to-user-em()
769
+ ----------------------------------------
770
+ Converts a value in px to a value in em
771
+ ----------------------------------------
772
+ */
773
+ /*
774
+ ----------------------------------------
775
+ rem-to-px()
776
+ ----------------------------------------
777
+ Converts a value in rem to a value in px
778
+ ----------------------------------------
779
+ */
780
+ /*
781
+ ----------------------------------------
782
+ spacing-multiple()
783
+ ----------------------------------------
784
+ Converts a spacing unit multiple into
785
+ the desired final units (currently rem)
786
+ ----------------------------------------
787
+ */
788
+ /*
789
+ ----------------------------------------
790
+ units()
791
+ ----------------------------------------
792
+ Converts a spacing unit into
793
+ the desired final units (currently rem)
794
+ ----------------------------------------
795
+ */
796
+ /*
797
+ ----------------------------------------
798
+ number-to-token()
799
+ ----------------------------------------
800
+ Converts an integer or numeric value
801
+ into a system value
802
+
803
+ Ex: 0.5 --> '05'
804
+ -1px --> 'neg-1px'
805
+ ----------------------------------------
806
+ */
807
+ /*
808
+ ----------------------------------------
809
+ Project fonts
810
+ ----------------------------------------
811
+ Collects font settings in a map for
812
+ looping.
813
+ ----------------------------------------
814
+ */
815
+ /*
816
+ ----------------------------------------
817
+ Luminance ranges
818
+ ----------------------------------------
819
+ */
820
+ /*
821
+ ----------------------------------------
822
+ ns()
823
+ ----------------------------------------
824
+ Add a namesspace of $type if that
825
+ namespace is set to output
826
+ ----------------------------------------
827
+ */
828
+ /*
829
+ ----------------------------------------
830
+ Line height
831
+ ----------------------------------------
832
+ */
833
+ /*
834
+ ----------------------------------------
835
+ Measure
836
+ ----------------------------------------
837
+ */
838
+ /*
839
+ ----------------------------------------
840
+ cap-height()
841
+ ----------------------------------------
842
+ Get the cap height of a valid typeface
843
+ ----------------------------------------
844
+ */
845
+ /*
846
+ ----------------------------------------
847
+ validate-typeface-token()
848
+ ----------------------------------------
849
+ Check to see if a typeface-token exists.
850
+ Throw an error if a passed token does
851
+ not exist in the typeface-token map.
852
+ ----------------------------------------
853
+ */
854
+ /*
855
+ ----------------------------------------
856
+ convert-to-font-type()
857
+ ----------------------------------------
858
+ Converts a font-role token into a
859
+ font-type token. Leaves font-type tokens
860
+ unchanged.
861
+ ----------------------------------------
862
+ */
863
+ /*
864
+ ----------------------------------------
865
+ font-sources()
866
+ ----------------------------------------
867
+ Outputs a list of font sources used in
868
+ a @font-face declaration.
869
+
870
+ $theme-font-browser-compatibility: true - output woff2, woff, ttf
871
+ $theme-font-browser-compatibility: false - output woff2
872
+
873
+ @param stem: string - [font path]/[custom-src.dir]/[custom-src.[style].[weight]]
874
+ @output: string
875
+
876
+ filetypes must be one of the filetypes set in variables/$project-font-face-filetypes (woff, woff2, ttf)
877
+ ----------------------------------------
878
+ */
879
+ /*
880
+ ----------------------------------------
881
+ get-font-stack()
882
+ ----------------------------------------
883
+ Get a font stack from a style- or
884
+ role-based font token.
885
+ ----------------------------------------
886
+ */
887
+ /*
888
+ ----------------------------------------
889
+ get-typeface-token()
890
+ ----------------------------------------
891
+ Get a typeface token from a font-type or
892
+ font-role token.
893
+ ----------------------------------------
894
+ */
895
+ /*
896
+ ----------------------------------------
897
+ normalize-type-scale()
898
+ ----------------------------------------
899
+ Normalizes a specific face's optical size
900
+ to a set target
901
+ ----------------------------------------
902
+ */
903
+ /*
904
+ ----------------------------------------
905
+ system-type-scale()
906
+ ----------------------------------------
907
+ Get a value from the system type scale
908
+ ----------------------------------------
909
+ */
910
+ /*
911
+ ----------------------------------------
912
+ Easing
913
+ ----------------------------------------
914
+ */
915
+ /* deprecated.scss
916
+ ---
917
+ Occasionally the design system will deprecate
918
+ old variables or functionality. If we replace
919
+ the old functionality with something new, this is a
920
+ place to connect the old functionality to the
921
+ new functionality, in the service of better
922
+ continuity and backwards compatibility within a
923
+ major release cycle.
924
+
925
+ Note the USWDS version where we deprecated the
926
+ old functionality in a comment.
927
+
928
+ Be sure to update notifications.scss.
929
+
930
+ This file should started fresh at each
931
+ major version.
932
+ */
933
+ /*
934
+ ----------------------------------------
935
+ advanced-color()
936
+ ----------------------------------------
937
+ Derive a color from a color triplet:
938
+ [family], [grade], [variant]
939
+ ----------------------------------------
940
+ */
941
+ /*
942
+ ----------------------------------------
943
+ calculate-grade()
944
+ ----------------------------------------
945
+ Derive the grade equivalent any color,
946
+ even non-token colors
947
+ ----------------------------------------
948
+ */
949
+ /*
950
+ ----------------------------------------
951
+ color-token-assignment()
952
+ ----------------------------------------
953
+ Get the system token equivalent of any
954
+ theme color token
955
+ ----------------------------------------
956
+ */
957
+ /*
958
+ ----------------------------------------
959
+ is-system-color-token()
960
+ ----------------------------------------
961
+ Return whether a token is a system
962
+ color token
963
+ ----------------------------------------
964
+ */
965
+ /*
966
+ ----------------------------------------
967
+ is-theme-color-token()
968
+ ----------------------------------------
969
+ Return whether a token is a theme
970
+ color token
971
+ ----------------------------------------
972
+ */
973
+ /*
974
+ ----------------------------------------
975
+ color-token-family()
976
+ ----------------------------------------
977
+ Returns the family of a color token.
978
+ Returns: color-family
979
+ color-token-family("accent-warm-vivid")
980
+ > "accent-warm"
981
+ color-token-family("red-50v")
982
+ > "red"
983
+ color-token-variant(("red", 50, "vivid"))
984
+ > "red"
985
+ ----------------------------------------
986
+ */
987
+ /*
988
+ ----------------------------------------
989
+ decompose()
990
+ ----------------------------------------
991
+ Convert a color token into into a list
992
+ of form [family], [grade], [variant]
993
+ Vivid variants return "vivid" as the
994
+ variant.
995
+ If neither grade nor variant exists,
996
+ returns 'null'
997
+ ----------------------------------------
998
+ */
999
+ /*
1000
+ ----------------------------------------
1001
+ color-token-family()
1002
+ ----------------------------------------
1003
+ Returns the family of a color token.
1004
+ Returns: color-family
1005
+ color-token-family("accent-warm-vivid")
1006
+ > "accent-warm"
1007
+ color-token-family("red-50v")
1008
+ > "red"
1009
+ color-token-variant(("red", 50, "vivid"))
1010
+ > "red"
1011
+ ----------------------------------------
1012
+ */
1013
+ /*
1014
+ ----------------------------------------
1015
+ color-token-grade()
1016
+ ----------------------------------------
1017
+ Returns the grade of a USWDS color token.
1018
+ Returns: color-grade
1019
+ color-token-grade("accent-warm")
1020
+ > "root"
1021
+ color-token-grade("accent-warm-vivid")
1022
+ > "root"
1023
+ color-token-grade("accent-warm-darker")
1024
+ > "darker"
1025
+ color-token-grade("red-50v")
1026
+ > 50
1027
+ color-token-variant(("red", 50, "vivid"))
1028
+ > 50
1029
+ ----------------------------------------
1030
+ */
1031
+ /*
1032
+ ----------------------------------------
1033
+ color-token-family()
1034
+ ----------------------------------------
1035
+ Returns the family of a color token.
1036
+ Returns: color-family
1037
+ color-token-family("accent-warm-vivid")
1038
+ > "accent-warm"
1039
+ color-token-family("red-50v")
1040
+ > "red"
1041
+ color-token-variant(("red", 50, "vivid"))
1042
+ > "red"
1043
+ ----------------------------------------
1044
+ */
1045
+ /*
1046
+ ----------------------------------------
1047
+ is-color-token()
1048
+ ----------------------------------------
1049
+ Returns whether a given string is a
1050
+ USWDS color token.
1051
+ ----------------------------------------
1052
+ */
1053
+ /*
1054
+ ----------------------------------------
1055
+ pow()
1056
+ ----------------------------------------
1057
+ Raises a unitless number to the power
1058
+ of another unitless number
1059
+ Includes helper functions
1060
+ ----------------------------------------
1061
+ */
1062
+ /*
1063
+ ----------------------------------------
1064
+ Helper functions
1065
+ ----------------------------------------
1066
+ */
1067
+ /* factorial()
1068
+ ----------------------------------------
1069
+ */
1070
+ /* summation()
1071
+ ----------------------------------------
1072
+ */
1073
+ /* exp-maclaurin()
1074
+ ----------------------------------------
1075
+ */
1076
+ /* ln()
1077
+ ----------------------------------------
1078
+ */
1079
+ /*
1080
+ ----------------------------------------
1081
+ color-token-type()
1082
+ ----------------------------------------
1083
+ Returns the type of a color token.
1084
+ Returns: "system" | "theme"
1085
+ ----------------------------------------
1086
+ */
1087
+ /*
1088
+ ----------------------------------------
1089
+ color-token-variant()
1090
+ ----------------------------------------
1091
+ Returns the variant of color token.
1092
+ Returns: "vivid" | false
1093
+ color-token-variant("accent-warm")
1094
+ > false
1095
+ color-token-variant("accent-warm-vivid")
1096
+ > "vivid"
1097
+ color-token-variant("red-50v")
1098
+ > "vivid"
1099
+ color-token-variant(("red", 50, "vivid"))
1100
+ > "vivid"
1101
+ ----------------------------------------
1102
+ */
1103
+ /*
1104
+ ----------------------------------------
1105
+ magic-number()
1106
+ ----------------------------------------
1107
+ Returns the magic number of two color
1108
+ grades. Takes numbers or color tokens.
1109
+ magic-number(50, 10)
1110
+ return: 40
1111
+ magic-number("red-50", "red-10")
1112
+ return: 40
1113
+ ----------------------------------------
1114
+ */
1115
+ /*
1116
+ ----------------------------------------
1117
+ is-accessible-magic-number()
1118
+ ----------------------------------------
1119
+ Returns whether two grades achieve
1120
+ specified target color contrast
1121
+ Returns: true | false
1122
+ is-accessible-magic-number(10, 50, "AA")
1123
+ > false
1124
+ is-accessible-magic-number(10, 60, "AA")
1125
+ > true
1126
+ ----------------------------------------
1127
+ */
1128
+ /*
1129
+ ----------------------------------------
1130
+ wcag-magic-number()
1131
+ ----------------------------------------
1132
+ Returns the magic number of a specific
1133
+ wcag grade:
1134
+ "AA"
1135
+ "AA-Large"
1136
+ "AAA"
1137
+ wcag-magic-number("AA")
1138
+ > 50
1139
+ ----------------------------------------
1140
+ */
1141
+ /*
1142
+ ----------------------------------------
1143
+ get-link-tokens-from-bg()
1144
+ ----------------------------------------
1145
+ Get accessible link colors for a given
1146
+ background color
1147
+ returns: link-token, hover-token
1148
+ get-link-tokens-from-bg(
1149
+ "black",
1150
+ "red-60",
1151
+ "red-10",
1152
+ "AA")
1153
+ > "red-10", "red-5"
1154
+ get-link-tokens-from-bg(
1155
+ "black",
1156
+ "red-60v",
1157
+ "red-10v",
1158
+ "AA-large")
1159
+ > "red-60v", "red-50v"
1160
+ get-link-tokens-from-bg(
1161
+ "black",
1162
+ "red-5v",
1163
+ "red-60v",
1164
+ "AA")
1165
+ > "red-5v", "white"
1166
+ get-link-tokens-from-bg(
1167
+ "black",
1168
+ "white",
1169
+ "red-60v",
1170
+ "AA")
1171
+ > "white", "white"
1172
+ ----------------------------------------
1173
+ */
1174
+ /*
1175
+ ----------------------------------------
1176
+ next-token()
1177
+ ----------------------------------------
1178
+ Returns next "darker" or "lighter" color
1179
+ token of the same token type and variant.
1180
+ Returns: color-token | false
1181
+ next-token("accent-warm", "lighter")
1182
+ > "accent-warm-light"
1183
+ next-token("gray-10", "lighter")
1184
+ > "gray-5"
1185
+ next-token("gray-5", "lighter")
1186
+ > "white"
1187
+ next-token("white", "lighter")
1188
+ > false
1189
+ next-token("red-50v", "darker")
1190
+ > "red-60v"
1191
+ next-token("red-50", "darker")
1192
+ > "red-60"
1193
+ next-token("red-80v", "darker")
1194
+ > "red-90"
1195
+ next-token("red-90", "darker")
1196
+ > "black"
1197
+ next-token("white", "darker")
1198
+ > "gray-5"
1199
+ next-token("black", "lighter")
1200
+ > "gray-90"
1201
+ ----------------------------------------
1202
+ */
1203
+ /*
1204
+ ----------------------------------------
1205
+ test-colors()
1206
+ ----------------------------------------
1207
+ Check to see if all system colors
1208
+ fall between the proper relative
1209
+ luminance range for their grade.
1210
+ Has a couple quirks, as the luminance()
1211
+ function returns slightly different
1212
+ results than expected.
1213
+ ----------------------------------------
1214
+ */
1215
+ /*
1216
+ ----------------------------------------
1217
+ columns()
1218
+ ----------------------------------------
1219
+ outputs a grid-col number based on
1220
+ the number of desired columns in the
1221
+ 12-column grid
1222
+
1223
+ Ex: columns(2) --> 6
1224
+ grid-col(columns(2))
1225
+ ----------------------------------------
1226
+ */
1227
+ /*
1228
+ ----------------------------------------
1229
+ USWDS Properties
1230
+ ----------------------------------------
1231
+ */
1232
+ /*
1233
+ ----------------------------------------
1234
+ get-uswds-value()
1235
+ ----------------------------------------
1236
+ Finds and outputs a value from the
1237
+ USWDS standard values.
1238
+
1239
+ Used to build other standard utility
1240
+ functions and mixins.
1241
+ ----------------------------------------
1242
+ */
1243
+ /*
1244
+ ----------------------------------------
1245
+ get-standard-values()
1246
+ ----------------------------------------
1247
+ Gets a map of USWDS standard values
1248
+ for a property
1249
+ ----------------------------------------
1250
+ */
1251
+ /*
1252
+ ----------------------------------------
1253
+ border-radius()
1254
+ ----------------------------------------
1255
+ Get a border-radius from the system
1256
+ border-radii
1257
+ ----------------------------------------
1258
+ */
1259
+ /*
1260
+ ----------------------------------------
1261
+ font-weight()
1262
+ fw()
1263
+ ----------------------------------------
1264
+ Get a font-weight value from the
1265
+ system font-weight
1266
+ ----------------------------------------
1267
+ */
1268
+ /*
1269
+ ----------------------------------------
1270
+ feature()
1271
+ ----------------------------------------
1272
+ Gets a valid USWDS font feature setting
1273
+ ----------------------------------------
1274
+ */
1275
+ /*
1276
+ ----------------------------------------
1277
+ flex()
1278
+ ----------------------------------------
1279
+ Gets a valid USWDS flex value
1280
+ ----------------------------------------
1281
+ */
1282
+ /*
1283
+ ----------------------------------------
1284
+ font-family()
1285
+ family()
1286
+ ----------------------------------------
1287
+ Get a font-family stack from a
1288
+ role-based or type-based font family
1289
+ ----------------------------------------
1290
+ */
1291
+ /*
1292
+ ----------------------------------------
1293
+ letter-spacing()
1294
+ ls()
1295
+ ----------------------------------------
1296
+ Get a letter-spacing value from the
1297
+ system letter-spacing
1298
+ ----------------------------------------
1299
+ */
1300
+ /*
1301
+ ----------------------------------------
1302
+ measure()
1303
+ ----------------------------------------
1304
+ Gets a valid USWDS reading line length
1305
+ ----------------------------------------
1306
+ */
1307
+ /*
1308
+ ----------------------------------------
1309
+ opacity()
1310
+ ----------------------------------------
1311
+ Get an opacity from the system
1312
+ opacities
1313
+ ----------------------------------------
1314
+ */
1315
+ /*
1316
+ ----------------------------------------
1317
+ order()
1318
+ ----------------------------------------
1319
+ Get an order value from the
1320
+ system orders
1321
+ ----------------------------------------
1322
+ */
1323
+ /*
1324
+ ----------------------------------------
1325
+ radius()
1326
+ ----------------------------------------
1327
+ Get a border-radius value from the
1328
+ system letter-spacing
1329
+ ----------------------------------------
1330
+ */
1331
+ /*
1332
+ ----------------------------------------
1333
+ font-size()
1334
+ ----------------------------------------
1335
+ Get type scale value from a [family] and
1336
+ [scale]
1337
+ ----------------------------------------
1338
+ */
1339
+ /*
1340
+ ----------------------------------------
1341
+ z-index()
1342
+ z()
1343
+ ----------------------------------------
1344
+ Get a z-index value from the
1345
+ system z-index
1346
+ ----------------------------------------
1347
+ */
1348
+ /*
1349
+ ----------------------------------------
1350
+ utility-font()
1351
+ ----------------------------------------
1352
+ Get a normalized font-size in rem from
1353
+ a family and a type size in either
1354
+ system scale or project scale
1355
+ ----------------------------------------
1356
+ Not the public-facing function.
1357
+ Used for building the utilities and
1358
+ withholds certain errors.
1359
+ ----------------------------------------
1360
+ */
1361
+ /*
1362
+ ----------------------------------------
1363
+ family()
1364
+ ----------------------------------------
1365
+ Get a font-family stack
1366
+ ----------------------------------------
1367
+ */
1368
+ /*
1369
+ ----------------------------------------
1370
+ size()
1371
+ ----------------------------------------
1372
+ Get a normalized font-size in rem from
1373
+ a family and a type size in either
1374
+ system scale or project scale
1375
+ ----------------------------------------
1376
+ */
1377
+ /*
1378
+ ----------------------------------------
1379
+ font()
1380
+ ----------------------------------------
1381
+ Get a font-family stack
1382
+ AND
1383
+ Get a normalized font-size in rem from
1384
+ a family and a type size in either
1385
+ system scale or project scale
1386
+ ----------------------------------------
1387
+ */
1388
+ /*
1389
+ ----------------------------------------
1390
+ typeset()
1391
+ ----------------------------------------
1392
+ Sets:
1393
+ - family
1394
+ - size
1395
+ - line-height
1396
+ ----------------------------------------
1397
+ */
1398
+ /* stylelint-disable max-nesting-depth */
1399
+ /*
1400
+ ----------------------------------------
1401
+ @render-pseudoclass
1402
+ ----------------------------------------
1403
+ Build a pseucoclass utiliy from values
1404
+ calculated in the @render-utilities-in
1405
+ loop
1406
+ ----------------------------------------
1407
+ */
1408
+ /*
1409
+ ----------------------------------------
1410
+ @render-utility
1411
+ ----------------------------------------
1412
+ Build a utility from values calculated
1413
+ in the @render-utilities-in loop
1414
+ ----------------------------------------
1415
+ TODO: Determine the proper use of
1416
+ unquote() in the following. Changed to
1417
+ account for a 'interpolation near
1418
+ operators will be simplified in a
1419
+ future version of Sass' warning.
1420
+ ----------------------------------------
1421
+ */
1422
+ /*
1423
+ ----------------------------------------
1424
+ @render-utilities-in
1425
+ ----------------------------------------
1426
+ The master loop that sets the building
1427
+ blocks of utilities from the values
1428
+ in individual rule settings and loops
1429
+ through all possible variants
1430
+ ----------------------------------------
1431
+ */
1432
+ /* stylelint-enable */
1433
+ /* notifications.scss
1434
+ ---
1435
+ Adds a notification at the top of each USWDS
1436
+ compile. Use this file for important notifications
1437
+ and updates to the design system.
1438
+
1439
+ This file should started fresh at each
1440
+ major version.
1441
+
1442
+ */
1443
+ /* prettier-ignore */
1444
+ /* prettier-ignore */
1445
+ /*
1446
+ * * * * * ==============================
1447
+ * * * * * ==============================
1448
+ * * * * * ==============================
1449
+ * * * * * ==============================
1450
+ ========================================
1451
+ ========================================
1452
+ ========================================
1453
+ ----------------------------------------
1454
+ GENERAL SETTINGS
1455
+ ----------------------------------------
1456
+ Read more about settings and
1457
+ USWDS style tokens in the documentation:
1458
+ https://designsystem.digital.gov/design-tokens
1459
+ ----------------------------------------
1460
+ */
1461
+ /*
1462
+ ----------------------------------------
1463
+ Image path
1464
+ ----------------------------------------
1465
+ Relative image file path
1466
+ ----------------------------------------
1467
+ */
1468
+ /*
1469
+ ----------------------------------------
1470
+ Show compile warnings
1471
+ ----------------------------------------
1472
+ Show Sass warnings when functions and
1473
+ mixins use non-standard tokens.
1474
+ AND
1475
+ Show updates and notifications.
1476
+ ----------------------------------------
1477
+ */
1478
+ /*
1479
+ ----------------------------------------
1480
+ Namespace
1481
+ ----------------------------------------
1482
+ */
1483
+ /*
1484
+ ----------------------------------------
1485
+ Prefix separator
1486
+ ----------------------------------------
1487
+ Set the character the separates
1488
+ responsive and state prefixes from the
1489
+ main class name.
1490
+ The default (":") needs to be preceded
1491
+ by two backslashes to be properly
1492
+ escaped.
1493
+ ----------------------------------------
1494
+ */
1495
+ /*
1496
+ ----------------------------------------
1497
+ Layout grid
1498
+ ----------------------------------------
1499
+ Should the layout grid classes output
1500
+ with !important
1501
+ ----------------------------------------
1502
+ */
1503
+ /*
1504
+ ----------------------------------------
1505
+ Border box sizing
1506
+ ----------------------------------------
1507
+ When set to true, sets the box-sizing
1508
+ property of all site elements to
1509
+ `border-box`.
1510
+ ----------------------------------------
1511
+ */
1512
+ /*
1513
+ ----------------------------------------
1514
+ Focus styles
1515
+ ----------------------------------------
1516
+ */
1517
+ /*
1518
+ ----------------------------------------
1519
+ Icons
1520
+ ----------------------------------------
1521
+ */
1522
+ /*
1523
+ * * * * * ==============================
1524
+ * * * * * ==============================
1525
+ * * * * * ==============================
1526
+ * * * * * ==============================
1527
+ ========================================
1528
+ ========================================
1529
+ ========================================
1530
+ ----------------------------------------
1531
+ TYPOGRAPHY SETTINGS
1532
+ ----------------------------------------
1533
+ Read more about settings and
1534
+ USWDS typography tokens in the documentation:
1535
+ https://designsystem.digital.gov/design-tokens/typesetting/overview/
1536
+ ----------------------------------------
1537
+ */
1538
+ /*
1539
+ ----------------------------------------
1540
+ Root font size
1541
+ ----------------------------------------
1542
+ Setting $theme-respect-user-font-size to
1543
+ true sets the root font size to 100% and
1544
+ uses ems for media queries
1545
+ ----------------------------------------
1546
+ $theme-root-font-size only applies when
1547
+ $theme-respect-user-font-size is set to
1548
+ false.
1549
+
1550
+ This will set the root font size
1551
+ as a specific px value and use px values
1552
+ for media queries.
1553
+
1554
+ Accepts true or false
1555
+ ----------------------------------------
1556
+ */
1557
+ /*
1558
+ ----------------------------------------
1559
+ Global styles
1560
+ ----------------------------------------
1561
+ Adds basic styling for the following
1562
+ unclassed elements:
1563
+
1564
+ - paragraph: paragraph text
1565
+ - link: links
1566
+ - content: paragraph text, links,
1567
+ headings, lists, and tables
1568
+ ----------------------------------------
1569
+ */
1570
+ /*
1571
+ ----------------------------------------
1572
+ Broswer compatibility mode
1573
+ ----------------------------------------
1574
+ When true, outputs woff and ttf font
1575
+ formats in addition to woff2
1576
+ ----------------------------------------
1577
+ */
1578
+ /*
1579
+ ----------------------------------------
1580
+ Font path
1581
+ ----------------------------------------
1582
+ Relative font file path
1583
+ ----------------------------------------
1584
+ */
1585
+ /*
1586
+ ----------------------------------------
1587
+ Custom typeface tokens
1588
+ ----------------------------------------
1589
+ Add a new custom typeface token if
1590
+ your project uses a typeface not already
1591
+ defined by USWDS.
1592
+ ----------------------------------------
1593
+ USWDS defines the following tokens
1594
+ by default:
1595
+ ----------------------------------------
1596
+ 'georgia'
1597
+ 'helvetica'
1598
+ 'merriweather'
1599
+ 'open-sans'
1600
+ 'public-sans'
1601
+ 'roboto-mono'
1602
+ 'source-sans-pro'
1603
+ 'system'
1604
+ 'tahoma'
1605
+ 'verdana'
1606
+ ----------------------------------------
1607
+ Add as many new tokens as you have
1608
+ custom typefaces. Reference your new
1609
+ token(s) in the type-based font settings
1610
+ using the quoted name of the token.
1611
+
1612
+ For example:
1613
+
1614
+ $theme-font-type-cond: 'example-font-token';
1615
+
1616
+ display-name:
1617
+ The display name of your font
1618
+
1619
+ cap-height:
1620
+ The height of a 500px `N` in Sketch
1621
+ ----------------------------------------
1622
+ You should change `example-[style]-token`
1623
+ names to something more descriptive.
1624
+ ----------------------------------------
1625
+ */
1626
+ /*
1627
+ ----------------------------------------
1628
+ Type-based font settings
1629
+ ----------------------------------------
1630
+ Set the type-based tokens for your
1631
+ project from the following tokens,
1632
+ or from any new font tokens you added in
1633
+ $theme-typeface-tokens.
1634
+ ----------------------------------------
1635
+ 'georgia'
1636
+ 'helvetica'
1637
+ 'merriweather'
1638
+ 'open-sans'
1639
+ 'public-sans'
1640
+ 'roboto-mono'
1641
+ 'source-sans-pro'
1642
+ 'system'
1643
+ 'tahoma'
1644
+ 'verdana'
1645
+ ----------------------------------------
1646
+ */
1647
+ /*
1648
+ ----------------------------------------
1649
+ Custom font stacks
1650
+ ----------------------------------------
1651
+ Add custom font stacks to any of the
1652
+ type-based fonts. Any USWDS typeface
1653
+ token already has a default stack.
1654
+
1655
+ Custom stacks don't need to include the
1656
+ font's display name. It will
1657
+ automatically appear at the start of
1658
+ the stack.
1659
+ ----------------------------------------
1660
+ Example:
1661
+ $theme-font-type-sans: 'source-sans-pro';
1662
+ $theme-font-sans-custom-stack: "Helvetica Neue", Helvetica, Arial, sans;
1663
+
1664
+ Output:
1665
+ font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;
1666
+ ----------------------------------------
1667
+ */
1668
+ /*
1669
+ ----------------------------------------
1670
+ Add any custom font source files
1671
+ ----------------------------------------
1672
+ If you want USWDS to generate additional
1673
+ @font-face declarations, add your font
1674
+ data below, following the example that
1675
+ follows.
1676
+ ----------------------------------------
1677
+ USWDS automatically generates @font-face
1678
+ declarations for the following
1679
+
1680
+ 'merriweather'
1681
+ 'public-sans'
1682
+ 'roboto-mono'
1683
+ 'source-sans-pro'
1684
+
1685
+ These typefaces not require custom
1686
+ source files.
1687
+ ----------------------------------------
1688
+ EXAMPLE
1689
+
1690
+ - dir:
1691
+ Directory relative to $theme-font-path
1692
+ - This directory should include fonts saved as
1693
+ .woff2
1694
+ ExampleSerif-Normal.woff2
1695
+
1696
+ $theme-font-serif-custom-src: (
1697
+ dir: 'custom/example-serif',
1698
+ roman: (
1699
+ 100: false,
1700
+ 200: false,
1701
+ 300: 'ExampleSerif-Light',
1702
+ 400: 'ExampleSerif-Normal',
1703
+ 500: false,
1704
+ 600: false,
1705
+ 700: 'ExampleSerif-Bold',
1706
+ 800: false,
1707
+ 900: false,
1708
+ ),
1709
+ italic: (
1710
+ 100: false,
1711
+ 200: false,
1712
+ 300: 'ExampleSerif-LightItalic',
1713
+ 400: 'ExampleSerif-Italic',
1714
+ 500: false,
1715
+ 600: false,
1716
+ 700: 'ExampleSerif-BoldItalic',
1717
+ 800: false,
1718
+ 900: false,
1719
+ ),
1720
+ );
1721
+ ----------------------------------------
1722
+ */
1723
+ /*
1724
+ ----------------------------------------
1725
+ Role-based font settings
1726
+ ----------------------------------------
1727
+ Set the role-based tokens for your
1728
+ project from the following font-type
1729
+ tokens.
1730
+ ----------------------------------------
1731
+ 'cond'
1732
+ 'icon'
1733
+ 'lang'
1734
+ 'mono'
1735
+ 'sans'
1736
+ 'serif'
1737
+ ----------------------------------------
1738
+ */
1739
+ /*
1740
+ ----------------------------------------
1741
+ Type scale
1742
+ ----------------------------------------
1743
+ Define your project's type scale using
1744
+ values from the USWDS system type scale
1745
+
1746
+ 1-20
1747
+ ----------------------------------------
1748
+ */
1749
+ /*
1750
+ ----------------------------------------
1751
+ Font weights
1752
+ ----------------------------------------
1753
+ Assign weights 100-900
1754
+ Or use `false` for unneeded weights.
1755
+ ----------------------------------------
1756
+ */
1757
+ /*
1758
+ ----------------------------------------
1759
+ General typography settings
1760
+ ----------------------------------------
1761
+ Type scale tokens
1762
+ ----------------------------------------
1763
+ micro: 10px
1764
+ 1: 12px
1765
+ 2: 13px
1766
+ 3: 14px
1767
+ 4: 15px
1768
+ 5: 16px
1769
+ 6: 17px
1770
+ 7: 18px
1771
+ 8: 20px
1772
+ 9: 22px
1773
+ 10: 24px
1774
+ 11: 28px
1775
+ 12: 32px
1776
+ 13: 36px
1777
+ 14: 40px
1778
+ 15: 48px
1779
+ 16: 56px
1780
+ 17: 64px
1781
+ 18: 80px
1782
+ 19: 120px
1783
+ 20: 140px
1784
+ ----------------------------------------
1785
+ Line height tokens
1786
+ ----------------------------------------
1787
+ 1: 1
1788
+ 2: 1.15
1789
+ 3: 1.35
1790
+ 4: 1.5
1791
+ 5: 1.62
1792
+ 6: 1.75
1793
+ ----------------------------------------
1794
+ Font role tokens
1795
+ ----------------------------------------
1796
+ 'ui'
1797
+ 'heading'
1798
+ 'body'
1799
+ 'code'
1800
+ 'alt'
1801
+ ----------------------------------------
1802
+ Measure (max-width) tokens
1803
+ ----------------------------------------
1804
+ 1: 44ex
1805
+ 2: 60ex
1806
+ 3: 64ex
1807
+ 4: 68ex
1808
+ 5: 74ex
1809
+ 6: 88ex
1810
+ none: none
1811
+ ----------------------------------------
1812
+ */
1813
+ /*
1814
+ * * * * * ==============================
1815
+ * * * * * ==============================
1816
+ * * * * * ==============================
1817
+ * * * * * ==============================
1818
+ ========================================
1819
+ ========================================
1820
+ ========================================
1821
+ ----------------------------------------
1822
+ COLOR SETTINGS
1823
+ ----------------------------------------
1824
+ Read more about settings and
1825
+ USWDS color tokens in the documentation:
1826
+ https://designsystem.digital.gov/design-tokens/color
1827
+ ----------------------------------------
1828
+ */
1829
+ /*
1830
+ ----------------------------------------
1831
+ Theme palette colors
1832
+ ----------------------------------------
1833
+ */
1834
+ /*
1835
+ ----------------------------------------
1836
+ State palette colors
1837
+ ----------------------------------------
1838
+ */
1839
+ /*
1840
+ ----------------------------------------
1841
+ General colors
1842
+ ----------------------------------------
1843
+ */
1844
+ /*
1845
+ * * * * * ==============================
1846
+ * * * * * ==============================
1847
+ * * * * * ==============================
1848
+ * * * * * ==============================
1849
+ ========================================
1850
+ ========================================
1851
+ ========================================
1852
+ ----------------------------------------
1853
+ COMPONENT SETTINGS
1854
+ ----------------------------------------
1855
+ Read more about settings and
1856
+ USWDS style tokens in the documentation:
1857
+ https://designsystem.digital.gov/design-tokens
1858
+ ----------------------------------------
1859
+ */
1860
+ /*
1861
+ * * * * * ==============================
1862
+ * * * * * ==============================
1863
+ * * * * * ==============================
1864
+ * * * * * ==============================
1865
+ ========================================
1866
+ ========================================
1867
+ ========================================
1868
+ ----------------------------------------
1869
+ SPACING SETTINGS
1870
+ ----------------------------------------
1871
+ Read more about settings and
1872
+ USWDS spacing units tokens in the
1873
+ documentation:
1874
+ https://designsystem.digital.gov/design-tokens/spacing-units
1875
+ ----------------------------------------
1876
+ */
1877
+ /*
1878
+ ----------------------------------------
1879
+ Border radius
1880
+ ----------------------------------------
1881
+ 2px 2px
1882
+ 0.5 4px
1883
+ 1 8px
1884
+ 1.5 12px
1885
+ 2 16px
1886
+ 2.5 20px
1887
+ 3 24px
1888
+ 4 32px
1889
+ 5 40px
1890
+ 6 48px
1891
+ 7 56px
1892
+ 8 64px
1893
+ 9 72px
1894
+ ----------------------------------------
1895
+ */
1896
+ /*
1897
+ ----------------------------------------
1898
+ Column gap
1899
+ ----------------------------------------
1900
+ 2px 2px
1901
+ 0.5 4px
1902
+ 1 8px
1903
+ 2 16px
1904
+ 3 24px
1905
+ 4 32px
1906
+ 5 40px
1907
+ 6 48px
1908
+ ----------------------------------------
1909
+ */
1910
+ /*
1911
+ ----------------------------------------
1912
+ Grid container max-width
1913
+ ----------------------------------------
1914
+ mobile
1915
+ mobile-lg
1916
+ tablet
1917
+ tablet-lg
1918
+ desktop
1919
+ desktop-lg
1920
+ widescreen
1921
+ ----------------------------------------
1922
+ */
1923
+ /*
1924
+ ----------------------------------------
1925
+ Site
1926
+ ----------------------------------------
1927
+ */
1928
+ /*
1929
+ * * * * * ==============================
1930
+ * * * * * ==============================
1931
+ * * * * * ==============================
1932
+ * * * * * ==============================
1933
+ ========================================
1934
+ ========================================
1935
+ ========================================
1936
+ ----------------------------------------
1937
+ UTILITIES SETTINGS
1938
+ ----------------------------------------
1939
+ Read more about settings and
1940
+ USWDS utilities in the documentation:
1941
+ https://designsystem.digital.gov/utilities
1942
+ ----------------------------------------
1943
+ */
1944
+ /*
1945
+ ----------------------------------------
1946
+ map-collect()
1947
+ ----------------------------------------
1948
+ Collect multiple maps into a single
1949
+ large map
1950
+ source: https://gist.github.com/bigglesrocks/d75091700f8f2be5abfe
1951
+ ----------------------------------------
1952
+ */
1953
+ /*
1954
+ ----------------------------------------
1955
+ Utility breakpoints
1956
+ ----------------------------------------
1957
+ Which breakpoints does your project
1958
+ need? Select as `true` any breakpoint
1959
+ used by utilities or layout grid
1960
+ ----------------------------------------
1961
+ */
1962
+ /*
1963
+ ----------------------------------------
1964
+ Global colors
1965
+ ----------------------------------------
1966
+ The following palettes will be added to
1967
+ - background-color
1968
+ - border-color
1969
+ - color
1970
+ - text-decoration-color
1971
+ ----------------------------------------
1972
+ */
1973
+ /*
1974
+ ----------------------------------------
1975
+ Settings
1976
+ ----------------------------------------
1977
+ */
1978
+ /*
1979
+ ----------------------------------------
1980
+ Values
1981
+ ----------------------------------------
1982
+ */
1983
+ /*
1984
+ ----------------------------------------
1985
+ append-important()
1986
+ ----------------------------------------
1987
+ Append `!important` to a list
1988
+ ----------------------------------------
1989
+ */
1990
+ /*
1991
+ ----------------------------------------
1992
+ get-last()
1993
+ ----------------------------------------
1994
+ Return the last item of a list,
1995
+ Return null if the value is null
1996
+ ----------------------------------------
1997
+ */
1998
+ /*
1999
+ ----------------------------------------
2000
+ de-list()
2001
+ ----------------------------------------
2002
+ Transform a one-element list or arglist
2003
+ into that single element.
2004
+ ----------------------------------------
2005
+ (1) => 1
2006
+ ((1)) => (1)
2007
+ ----------------------------------------
2008
+ */
2009
+ /*
2010
+ ----------------------------------------
2011
+ error-not-token()
2012
+ ----------------------------------------
2013
+ Returns a common not-a-token error.
2014
+ ----------------------------------------
2015
+ */
2016
+ /*
2017
+ ----------------------------------------
2018
+ uswds-error()
2019
+ ----------------------------------------
2020
+ Allow the system to pass an error as text
2021
+ to test error states in unit testing
2022
+ ----------------------------------------
2023
+ */
2024
+ /*
2025
+ ----------------------------------------
2026
+ get-default()
2027
+ ----------------------------------------
2028
+ Returns the default value from a map
2029
+ of project defaults
2030
+ get-default("bg-color")
2031
+ > $theme-body-background-color
2032
+ ----------------------------------------
2033
+ */
2034
+ /*
2035
+ ----------------------------------------
2036
+ has-important()
2037
+ ----------------------------------------
2038
+ Check to see if `!important` is
2039
+ being passed in a mixin's props
2040
+ ----------------------------------------
2041
+ */
2042
+ /*
2043
+ ----------------------------------------
2044
+ map-deep-get()
2045
+ ----------------------------------------
2046
+ @author Hugo Giraudel
2047
+ @access public
2048
+ @param {Map} $map - Map
2049
+ @param {Arglist} $keys - Key chain
2050
+ @return {*} - Desired value
2051
+ ----------------------------------------
2052
+ */
2053
+ /*
2054
+ ----------------------------------------
2055
+ multi-cat()
2056
+ ----------------------------------------
2057
+ Concatenate two lists
2058
+ ----------------------------------------
2059
+ */
2060
+ /*
2061
+ ----------------------------------------
2062
+ remove()
2063
+ ----------------------------------------
2064
+ Remove a value from a list
2065
+ ----------------------------------------
2066
+ */
2067
+ /*
2068
+ ----------------------------------------
2069
+ smart-quote()
2070
+ ----------------------------------------
2071
+ Quotes strings
2072
+ Inspects `px`, `xs`, and `xl` numbers
2073
+ Leaves bools as is
2074
+ ----------------------------------------
2075
+ */
2076
+ /*
2077
+ ----------------------------------------
2078
+ str-replace()
2079
+ ----------------------------------------
2080
+ Replace any substring with another
2081
+ string
2082
+ ----------------------------------------
2083
+ */
2084
+ /*
2085
+ ----------------------------------------
2086
+ str-split()
2087
+ ----------------------------------------
2088
+ Split a string at a given separator
2089
+ and convert into a list of substrings
2090
+ ----------------------------------------
2091
+ */
2092
+ /*
2093
+ ----------------------------------------
2094
+ strip-unit()
2095
+ ----------------------------------------
2096
+ Remove the unit of a length
2097
+ @author Hugo Giraudel
2098
+ @param {Number} $number - Number to remove unit from
2099
+ @return {Number} - Unitless number
2100
+ ----------------------------------------
2101
+ */
2102
+ /*
2103
+ ----------------------------------------
2104
+ base-to-map()
2105
+ @TODO: Deprecate and delete
2106
+ ----------------------------------------
2107
+ Convert a single base to a USWDS
2108
+ value map.
2109
+
2110
+ Candidate for deprecation if we remove
2111
+ isReadable
2112
+ ----------------------------------------
2113
+ */
2114
+ /*
2115
+ ----------------------------------------
2116
+ to-number()
2117
+ ----------------------------------------
2118
+ Casts a string into a number
2119
+ ----------------------------------------
2120
+ @param {String | Number} $value - Value to be parsed
2121
+ @return {Number}
2122
+ ----------------------------------------
2123
+ */
2124
+ /*
2125
+ ----------------------------------------
2126
+ unpack()
2127
+ ----------------------------------------
2128
+ Create lists of single items from lists
2129
+ of lists.
2130
+ ----------------------------------------
2131
+ (1, (2.1, 2.2), 3) -->
2132
+ (1, 2.1, 2.2, 3)
2133
+ ----------------------------------------
2134
+ */
2135
+ /*
2136
+ ----------------------------------------
2137
+ color()
2138
+ ----------------------------------------
2139
+ Derive a color from a color shortcode
2140
+ ----------------------------------------
2141
+ */
2142
+ /*
2143
+ ----------------------------------------
2144
+ get-system-color()
2145
+ ----------------------------------------
2146
+ Derive a system color from its
2147
+ family, value, and vivid or a passed
2148
+ variable that is, itself, a list
2149
+ ----------------------------------------
2150
+ */
2151
+ /*
2152
+ ----------------------------------------
2153
+ color()
2154
+ ----------------------------------------
2155
+ Derive a color from a color shortcode
2156
+ ----------------------------------------
2157
+ */
2158
+ /*
2159
+ ----------------------------------------
2160
+ advanced-color()
2161
+ ----------------------------------------
2162
+ Derive a color from a color triplet:
2163
+ [family], [grade], [variant]
2164
+ ----------------------------------------
2165
+ */
2166
+ /*
2167
+ ----------------------------------------
2168
+ Luminance ranges
2169
+ ----------------------------------------
2170
+ */
2171
+ /*
2172
+ ----------------------------------------
2173
+ calculate-grade()
2174
+ ----------------------------------------
2175
+ Derive the grade equivalent any color,
2176
+ even non-token colors
2177
+ ----------------------------------------
2178
+ */
2179
+ /*
2180
+ ----------------------------------------
2181
+ color-token-assignment()
2182
+ ----------------------------------------
2183
+ Get the system token equivalent of any
2184
+ theme color token
2185
+ ----------------------------------------
2186
+ */
2187
+ /*
2188
+ ----------------------------------------
2189
+ is-system-color-token()
2190
+ ----------------------------------------
2191
+ Return whether a token is a system
2192
+ color token
2193
+ ----------------------------------------
2194
+ */
2195
+ /*
2196
+ ----------------------------------------
2197
+ color()
2198
+ ----------------------------------------
2199
+ Derive a color from a color shortcode
2200
+ ----------------------------------------
2201
+ */
2202
+ /*
2203
+ ----------------------------------------
2204
+ color()
2205
+ ----------------------------------------
2206
+ Derive a color from a color shortcode
2207
+ ----------------------------------------
2208
+ */
2209
+ /*
2210
+ ----------------------------------------
2211
+ set-theme-color()
2212
+ ----------------------------------------
2213
+ Derive a color from a system color token
2214
+ or a hex value
2215
+ ----------------------------------------
2216
+ */
2217
+ /*
2218
+ ----------------------------------------
2219
+ is-theme-color-token()
2220
+ ----------------------------------------
2221
+ Return whether a token is a theme
2222
+ color token
2223
+ ----------------------------------------
2224
+ */
2225
+ /*
2226
+ ----------------------------------------
2227
+ color-token-family()
2228
+ ----------------------------------------
2229
+ Returns the family of a color token.
2230
+ Returns: color-family
2231
+ color-token-family("accent-warm-vivid")
2232
+ > "accent-warm"
2233
+ color-token-family("red-50v")
2234
+ > "red"
2235
+ color-token-variant(("red", 50, "vivid"))
2236
+ > "red"
2237
+ ----------------------------------------
2238
+ */
2239
+ /*
2240
+ ----------------------------------------
2241
+ decompose()
2242
+ ----------------------------------------
2243
+ Convert a color token into into a list
2244
+ of form [family], [grade], [variant]
2245
+ Vivid variants return "vivid" as the
2246
+ variant.
2247
+ If neither grade nor variant exists,
2248
+ returns 'null'
2249
+ ----------------------------------------
2250
+ */
2251
+ /*
2252
+ ----------------------------------------
2253
+ color-token-family()
2254
+ ----------------------------------------
2255
+ Returns the family of a color token.
2256
+ Returns: color-family
2257
+ color-token-family("accent-warm-vivid")
2258
+ > "accent-warm"
2259
+ color-token-family("red-50v")
2260
+ > "red"
2261
+ color-token-variant(("red", 50, "vivid"))
2262
+ > "red"
2263
+ ----------------------------------------
2264
+ */
2265
+ /*
2266
+ ----------------------------------------
2267
+ color-token-grade()
2268
+ ----------------------------------------
2269
+ Returns the grade of a USWDS color token.
2270
+ Returns: color-grade
2271
+ color-token-grade("accent-warm")
2272
+ > "root"
2273
+ color-token-grade("accent-warm-vivid")
2274
+ > "root"
2275
+ color-token-grade("accent-warm-darker")
2276
+ > "darker"
2277
+ color-token-grade("red-50v")
2278
+ > 50
2279
+ color-token-variant(("red", 50, "vivid"))
2280
+ > 50
2281
+ ----------------------------------------
2282
+ */
2283
+ /*
2284
+ ----------------------------------------
2285
+ color-token-family()
2286
+ ----------------------------------------
2287
+ Returns the family of a color token.
2288
+ Returns: color-family
2289
+ color-token-family("accent-warm-vivid")
2290
+ > "accent-warm"
2291
+ color-token-family("red-50v")
2292
+ > "red"
2293
+ color-token-variant(("red", 50, "vivid"))
2294
+ > "red"
2295
+ ----------------------------------------
2296
+ */
2297
+ /*
2298
+ ----------------------------------------
2299
+ color()
2300
+ ----------------------------------------
2301
+ Derive a color from a color shortcode
2302
+ ----------------------------------------
2303
+ */
2304
+ /*
2305
+ ----------------------------------------
2306
+ is-color-token()
2307
+ ----------------------------------------
2308
+ Returns whether a given string is a
2309
+ USWDS color token.
2310
+ ----------------------------------------
2311
+ */
2312
+ /*
2313
+ ----------------------------------------
2314
+ pow()
2315
+ ----------------------------------------
2316
+ Raises a unitless number to the power
2317
+ of another unitless number
2318
+ Includes helper functions
2319
+ ----------------------------------------
2320
+ */
2321
+ /*
2322
+ ----------------------------------------
2323
+ Helper functions
2324
+ ----------------------------------------
2325
+ */
2326
+ /* factorial()
2327
+ ----------------------------------------
2328
+ */
2329
+ /* summation()
2330
+ ----------------------------------------
2331
+ */
2332
+ /* exp-maclaurin()
2333
+ ----------------------------------------
2334
+ */
2335
+ /* ln()
2336
+ ----------------------------------------
2337
+ */
2338
+ /*
2339
+ ----------------------------------------
2340
+ color-token-type()
2341
+ ----------------------------------------
2342
+ Returns the type of a color token.
2343
+ Returns: "system" | "theme"
2344
+ ----------------------------------------
2345
+ */
2346
+ /*
2347
+ ----------------------------------------
2348
+ color-token-variant()
2349
+ ----------------------------------------
2350
+ Returns the variant of color token.
2351
+ Returns: "vivid" | false
2352
+ color-token-variant("accent-warm")
2353
+ > false
2354
+ color-token-variant("accent-warm-vivid")
2355
+ > "vivid"
2356
+ color-token-variant("red-50v")
2357
+ > "vivid"
2358
+ color-token-variant(("red", 50, "vivid"))
2359
+ > "vivid"
2360
+ ----------------------------------------
2361
+ */
2362
+ /*
2363
+ ----------------------------------------
2364
+ magic-number()
2365
+ ----------------------------------------
2366
+ Returns the magic number of two color
2367
+ grades. Takes numbers or color tokens.
2368
+ magic-number(50, 10)
2369
+ return: 40
2370
+ magic-number("red-50", "red-10")
2371
+ return: 40
2372
+ ----------------------------------------
2373
+ */
2374
+ /*
2375
+ ----------------------------------------
2376
+ is-accessible-magic-number()
2377
+ ----------------------------------------
2378
+ Returns whether two grades achieve
2379
+ specified target color contrast
2380
+ Returns: true | false
2381
+ is-accessible-magic-number(10, 50, "AA")
2382
+ > false
2383
+ is-accessible-magic-number(10, 60, "AA")
2384
+ > true
2385
+ ----------------------------------------
2386
+ */
2387
+ /*
2388
+ ----------------------------------------
2389
+ wcag-magic-number()
2390
+ ----------------------------------------
2391
+ Returns the magic number of a specific
2392
+ wcag grade:
2393
+ "AA"
2394
+ "AA-Large"
2395
+ "AAA"
2396
+ wcag-magic-number("AA")
2397
+ > 50
2398
+ ----------------------------------------
2399
+ */
2400
+ /*
2401
+ ----------------------------------------
2402
+ get-link-tokens-from-bg()
2403
+ ----------------------------------------
2404
+ Get accessible link colors for a given
2405
+ background color
2406
+ returns: link-token, hover-token
2407
+ get-link-tokens-from-bg(
2408
+ "black",
2409
+ "red-60",
2410
+ "red-10",
2411
+ "AA")
2412
+ > "red-10", "red-5"
2413
+ get-link-tokens-from-bg(
2414
+ "black",
2415
+ "red-60v",
2416
+ "red-10v",
2417
+ "AA-large")
2418
+ > "red-60v", "red-50v"
2419
+ get-link-tokens-from-bg(
2420
+ "black",
2421
+ "red-5v",
2422
+ "red-60v",
2423
+ "AA")
2424
+ > "red-5v", "white"
2425
+ get-link-tokens-from-bg(
2426
+ "black",
2427
+ "white",
2428
+ "red-60v",
2429
+ "AA")
2430
+ > "white", "white"
2431
+ ----------------------------------------
2432
+ */
2433
+ /*
2434
+ ----------------------------------------
2435
+ next-token()
2436
+ ----------------------------------------
2437
+ Returns next "darker" or "lighter" color
2438
+ token of the same token type and variant.
2439
+ Returns: color-token | false
2440
+ next-token("accent-warm", "lighter")
2441
+ > "accent-warm-light"
2442
+ next-token("gray-10", "lighter")
2443
+ > "gray-5"
2444
+ next-token("gray-5", "lighter")
2445
+ > "white"
2446
+ next-token("white", "lighter")
2447
+ > false
2448
+ next-token("red-50v", "darker")
2449
+ > "red-60v"
2450
+ next-token("red-50", "darker")
2451
+ > "red-60"
2452
+ next-token("red-80v", "darker")
2453
+ > "red-90"
2454
+ next-token("red-90", "darker")
2455
+ > "black"
2456
+ next-token("white", "darker")
2457
+ > "gray-5"
2458
+ next-token("black", "lighter")
2459
+ > "gray-90"
2460
+ ----------------------------------------
2461
+ */
2462
+ /*
2463
+ ----------------------------------------
2464
+ color()
2465
+ ----------------------------------------
2466
+ Derive a color from a color shortcode
2467
+ ----------------------------------------
2468
+ */
2469
+ /*
2470
+ ----------------------------------------
2471
+ test-colors()
2472
+ ----------------------------------------
2473
+ Check to see if all system colors
2474
+ fall between the proper relative
2475
+ luminance range for their grade.
2476
+ Has a couple quirks, as the luminance()
2477
+ function returns slightly different
2478
+ results than expected.
2479
+ ----------------------------------------
2480
+ */
2481
+ /*
2482
+ ----------------------------------------
2483
+ Line height
2484
+ ----------------------------------------
2485
+ */
2486
+ /*
2487
+ ----------------------------------------
2488
+ Measure
2489
+ ----------------------------------------
2490
+ */
2491
+ /*
2492
+ ----------------------------------------
2493
+ spacing-multiple()
2494
+ ----------------------------------------
2495
+ Converts a spacing unit multiple into
2496
+ the desired final units (currently rem)
2497
+ ----------------------------------------
2498
+ */
2499
+ /*
2500
+ ----------------------------------------
2501
+ cap-height()
2502
+ ----------------------------------------
2503
+ Get the cap height of a valid typeface
2504
+ ----------------------------------------
2505
+ */
2506
+ /*
2507
+ ----------------------------------------
2508
+ validate-typeface-token()
2509
+ ----------------------------------------
2510
+ Check to see if a typeface-token exists.
2511
+ Throw an error if a passed token does
2512
+ not exist in the typeface-token map.
2513
+ ----------------------------------------
2514
+ */
2515
+ /*
2516
+ ----------------------------------------
2517
+ convert-to-font-type()
2518
+ ----------------------------------------
2519
+ Converts a font-role token into a
2520
+ font-type token. Leaves font-type tokens
2521
+ unchanged.
2522
+ ----------------------------------------
2523
+ */
2524
+ /*
2525
+ ----------------------------------------
2526
+ font-sources()
2527
+ ----------------------------------------
2528
+ Outputs a list of font sources used in
2529
+ a @font-face declaration.
2530
+
2531
+ $theme-font-browser-compatibility: true - output woff2, woff, ttf
2532
+ $theme-font-browser-compatibility: false - output woff2
2533
+
2534
+ @param stem: string - [font path]/[custom-src.dir]/[custom-src.[style].[weight]]
2535
+ @output: string
2536
+
2537
+ filetypes must be one of the filetypes set in variables/$project-font-face-filetypes (woff, woff2, ttf)
2538
+ ----------------------------------------
2539
+ */
2540
+ /*
2541
+ ----------------------------------------
2542
+ Project fonts
2543
+ ----------------------------------------
2544
+ Collects font settings in a map for
2545
+ looping.
2546
+ ----------------------------------------
2547
+ */
2548
+ /*
2549
+ ----------------------------------------
2550
+ get-font-stack()
2551
+ ----------------------------------------
2552
+ Get a font stack from a style- or
2553
+ role-based font token.
2554
+ ----------------------------------------
2555
+ */
2556
+ /*
2557
+ ----------------------------------------
2558
+ get-typeface-token()
2559
+ ----------------------------------------
2560
+ Get a typeface token from a font-type or
2561
+ font-role token.
2562
+ ----------------------------------------
2563
+ */
2564
+ /*
2565
+ ----------------------------------------
2566
+ px-to-rem()
2567
+ ----------------------------------------
2568
+ Converts a value in px to a value in rem
2569
+ ----------------------------------------
2570
+ */
2571
+ /*
2572
+ ----------------------------------------
2573
+ rem-to-user-em()
2574
+ ----------------------------------------
2575
+ Converts a value in rem to a value in
2576
+ [user-settings] em for use in media
2577
+ queries
2578
+ ----------------------------------------
2579
+ */
2580
+ /*
2581
+ ----------------------------------------
2582
+ px-to-user-em()
2583
+ ----------------------------------------
2584
+ Converts a value in px to a value in em
2585
+ ----------------------------------------
2586
+ */
2587
+ /*
2588
+ ----------------------------------------
2589
+ rem-to-px()
2590
+ ----------------------------------------
2591
+ Converts a value in rem to a value in px
2592
+ ----------------------------------------
2593
+ */
2594
+ /*
2595
+ ----------------------------------------
2596
+ units()
2597
+ ----------------------------------------
2598
+ Converts a spacing unit into
2599
+ the desired final units (currently rem)
2600
+ ----------------------------------------
2601
+ */
2602
+ /*
2603
+ ----------------------------------------
2604
+ number-to-token()
2605
+ ----------------------------------------
2606
+ Converts an integer or numeric value
2607
+ into a system value
2608
+
2609
+ Ex: 0.5 --> '05'
2610
+ -1px --> 'neg-1px'
2611
+ ----------------------------------------
2612
+ */
2613
+ /*
2614
+ ----------------------------------------
2615
+ normalize-type-scale()
2616
+ ----------------------------------------
2617
+ Normalizes a specific face's optical size
2618
+ to a set target
2619
+ ----------------------------------------
2620
+ */
2621
+ /*
2622
+ ----------------------------------------
2623
+ system-type-scale()
2624
+ ----------------------------------------
2625
+ Get a value from the system type scale
2626
+ ----------------------------------------
2627
+ */
2628
+ /*
2629
+ ----------------------------------------
2630
+ columns()
2631
+ ----------------------------------------
2632
+ outputs a grid-col number based on
2633
+ the number of desired columns in the
2634
+ 12-column grid
2635
+
2636
+ Ex: columns(2) --> 6
2637
+ grid-col(columns(2))
2638
+ ----------------------------------------
2639
+ */
2640
+ /*
2641
+ ----------------------------------------
2642
+ USWDS Properties
2643
+ ----------------------------------------
2644
+ */
2645
+ /*
2646
+ ----------------------------------------
2647
+ get-uswds-value()
2648
+ ----------------------------------------
2649
+ Finds and outputs a value from the
2650
+ USWDS standard values.
2651
+
2652
+ Used to build other standard utility
2653
+ functions and mixins.
2654
+ ----------------------------------------
2655
+ */
2656
+ /*
2657
+ ----------------------------------------
2658
+ get-standard-values()
2659
+ ----------------------------------------
2660
+ Gets a map of USWDS standard values
2661
+ for a property
2662
+ ----------------------------------------
2663
+ */
2664
+ /*
2665
+ ----------------------------------------
2666
+ ns()
2667
+ ----------------------------------------
2668
+ Add a namesspace of $type if that
2669
+ namespace is set to output
2670
+ ----------------------------------------
2671
+ */
2672
+ /*
2673
+ ----------------------------------------
2674
+ border-radius()
2675
+ ----------------------------------------
2676
+ Get a border-radius from the system
2677
+ border-radii
2678
+ ----------------------------------------
2679
+ */
2680
+ /*
2681
+ ----------------------------------------
2682
+ font-weight()
2683
+ fw()
2684
+ ----------------------------------------
2685
+ Get a font-weight value from the
2686
+ system font-weight
2687
+ ----------------------------------------
2688
+ */
2689
+ /*
2690
+ ----------------------------------------
2691
+ feature()
2692
+ ----------------------------------------
2693
+ Gets a valid USWDS font feature setting
2694
+ ----------------------------------------
2695
+ */
2696
+ /*
2697
+ ----------------------------------------
2698
+ flex()
2699
+ ----------------------------------------
2700
+ Gets a valid USWDS flex value
2701
+ ----------------------------------------
2702
+ */
2703
+ /*
2704
+ ----------------------------------------
2705
+ font-family()
2706
+ family()
2707
+ ----------------------------------------
2708
+ Get a font-family stack from a
2709
+ role-based or type-based font family
2710
+ ----------------------------------------
2711
+ */
2712
+ /*
2713
+ ----------------------------------------
2714
+ letter-spacing()
2715
+ ls()
2716
+ ----------------------------------------
2717
+ Get a letter-spacing value from the
2718
+ system letter-spacing
2719
+ ----------------------------------------
2720
+ */
2721
+ /*
2722
+ ----------------------------------------
2723
+ measure()
2724
+ ----------------------------------------
2725
+ Gets a valid USWDS reading line length
2726
+ ----------------------------------------
2727
+ */
2728
+ /*
2729
+ ----------------------------------------
2730
+ opacity()
2731
+ ----------------------------------------
2732
+ Get an opacity from the system
2733
+ opacities
2734
+ ----------------------------------------
2735
+ */
2736
+ /*
2737
+ ----------------------------------------
2738
+ order()
2739
+ ----------------------------------------
2740
+ Get an order value from the
2741
+ system orders
2742
+ ----------------------------------------
2743
+ */
2744
+ /*
2745
+ ----------------------------------------
2746
+ radius()
2747
+ ----------------------------------------
2748
+ Get a border-radius value from the
2749
+ system letter-spacing
2750
+ ----------------------------------------
2751
+ */
2752
+ /*
2753
+ ----------------------------------------
2754
+ font-size()
2755
+ ----------------------------------------
2756
+ Get type scale value from a [family] and
2757
+ [scale]
2758
+ ----------------------------------------
2759
+ */
2760
+ /*
2761
+ ----------------------------------------
2762
+ z-index()
2763
+ z()
2764
+ ----------------------------------------
2765
+ Get a z-index value from the
2766
+ system z-index
2767
+ ----------------------------------------
2768
+ */
2769
+ /*
2770
+ ----------------------------------------
2771
+ utility-font()
2772
+ ----------------------------------------
2773
+ Get a normalized font-size in rem from
2774
+ a family and a type size in either
2775
+ system scale or project scale
2776
+ ----------------------------------------
2777
+ Not the public-facing function.
2778
+ Used for building the utilities and
2779
+ withholds certain errors.
2780
+ ----------------------------------------
2781
+ */
2782
+ /*
2783
+ ----------------------------------------
2784
+ family()
2785
+ ----------------------------------------
2786
+ Get a font-family stack
2787
+ ----------------------------------------
2788
+ */
2789
+ /*
2790
+ ----------------------------------------
2791
+ size()
2792
+ ----------------------------------------
2793
+ Get a normalized font-size in rem from
2794
+ a family and a type size in either
2795
+ system scale or project scale
2796
+ ----------------------------------------
2797
+ */
2798
+ /*
2799
+ ----------------------------------------
2800
+ font()
2801
+ ----------------------------------------
2802
+ Get a font-family stack
2803
+ AND
2804
+ Get a normalized font-size in rem from
2805
+ a family and a type size in either
2806
+ system scale or project scale
2807
+ ----------------------------------------
2808
+ */
2809
+ /*
2810
+ ----------------------------------------
2811
+ typeset()
2812
+ ----------------------------------------
2813
+ Sets:
2814
+ - family
2815
+ - size
2816
+ - line-height
2817
+ ----------------------------------------
2818
+ */
2819
+ /*
2820
+ ----------------------------------------
2821
+ Easing
2822
+ ----------------------------------------
2823
+ */
2824
+ /*
2825
+ ----------------------------------------
2826
+ append-important()
2827
+ ----------------------------------------
2828
+ Append `!important` to a list
2829
+ ----------------------------------------
2830
+ */
2831
+ /*
2832
+ ----------------------------------------
2833
+ get-last()
2834
+ ----------------------------------------
2835
+ Return the last item of a list,
2836
+ Return null if the value is null
2837
+ ----------------------------------------
2838
+ */
2839
+ /*
2840
+ ----------------------------------------
2841
+ de-list()
2842
+ ----------------------------------------
2843
+ Transform a one-element list or arglist
2844
+ into that single element.
2845
+ ----------------------------------------
2846
+ (1) => 1
2847
+ ((1)) => (1)
2848
+ ----------------------------------------
2849
+ */
2850
+ /*
2851
+ ----------------------------------------
2852
+ error-not-token()
2853
+ ----------------------------------------
2854
+ Returns a common not-a-token error.
2855
+ ----------------------------------------
2856
+ */
2857
+ /*
2858
+ ----------------------------------------
2859
+ uswds-error()
2860
+ ----------------------------------------
2861
+ Allow the system to pass an error as text
2862
+ to test error states in unit testing
2863
+ ----------------------------------------
2864
+ */
2865
+ /*
2866
+ ----------------------------------------
2867
+ get-default()
2868
+ ----------------------------------------
2869
+ Returns the default value from a map
2870
+ of project defaults
2871
+ get-default("bg-color")
2872
+ > $theme-body-background-color
2873
+ ----------------------------------------
2874
+ */
2875
+ /*
2876
+ * * * * * ==============================
2877
+ * * * * * ==============================
2878
+ * * * * * ==============================
2879
+ * * * * * ==============================
2880
+ ========================================
2881
+ ========================================
2882
+ ========================================
2883
+ ----------------------------------------
2884
+ GENERAL SETTINGS
2885
+ ----------------------------------------
2886
+ Read more about settings and
2887
+ USWDS style tokens in the documentation:
2888
+ https://designsystem.digital.gov/design-tokens
2889
+ ----------------------------------------
2890
+ */
2891
+ /*
2892
+ ----------------------------------------
2893
+ Image path
2894
+ ----------------------------------------
2895
+ Relative image file path
2896
+ ----------------------------------------
2897
+ */
2898
+ /*
2899
+ ----------------------------------------
2900
+ Show compile warnings
2901
+ ----------------------------------------
2902
+ Show Sass warnings when functions and
2903
+ mixins use non-standard tokens.
2904
+ AND
2905
+ Show updates and notifications.
2906
+ ----------------------------------------
2907
+ */
2908
+ /*
2909
+ ----------------------------------------
2910
+ Namespace
2911
+ ----------------------------------------
2912
+ */
2913
+ /*
2914
+ ----------------------------------------
2915
+ Prefix separator
2916
+ ----------------------------------------
2917
+ Set the character the separates
2918
+ responsive and state prefixes from the
2919
+ main class name.
2920
+ The default (":") needs to be preceded
2921
+ by two backslashes to be properly
2922
+ escaped.
2923
+ ----------------------------------------
2924
+ */
2925
+ /*
2926
+ ----------------------------------------
2927
+ Layout grid
2928
+ ----------------------------------------
2929
+ Should the layout grid classes output
2930
+ with !important
2931
+ ----------------------------------------
2932
+ */
2933
+ /*
2934
+ ----------------------------------------
2935
+ Border box sizing
2936
+ ----------------------------------------
2937
+ When set to true, sets the box-sizing
2938
+ property of all site elements to
2939
+ `border-box`.
2940
+ ----------------------------------------
2941
+ */
2942
+ /*
2943
+ ----------------------------------------
2944
+ Focus styles
2945
+ ----------------------------------------
2946
+ */
2947
+ /*
2948
+ ----------------------------------------
2949
+ Icons
2950
+ ----------------------------------------
2951
+ */
2952
+ /*
2953
+ * * * * * ==============================
2954
+ * * * * * ==============================
2955
+ * * * * * ==============================
2956
+ * * * * * ==============================
2957
+ ========================================
2958
+ ========================================
2959
+ ========================================
2960
+ ----------------------------------------
2961
+ TYPOGRAPHY SETTINGS
2962
+ ----------------------------------------
2963
+ Read more about settings and
2964
+ USWDS typography tokens in the documentation:
2965
+ https://designsystem.digital.gov/design-tokens/typesetting/overview/
2966
+ ----------------------------------------
2967
+ */
2968
+ /*
2969
+ ----------------------------------------
2970
+ Root font size
2971
+ ----------------------------------------
2972
+ Setting $theme-respect-user-font-size to
2973
+ true sets the root font size to 100% and
2974
+ uses ems for media queries
2975
+ ----------------------------------------
2976
+ $theme-root-font-size only applies when
2977
+ $theme-respect-user-font-size is set to
2978
+ false.
2979
+
2980
+ This will set the root font size
2981
+ as a specific px value and use px values
2982
+ for media queries.
2983
+
2984
+ Accepts true or false
2985
+ ----------------------------------------
2986
+ */
2987
+ /*
2988
+ ----------------------------------------
2989
+ Global styles
2990
+ ----------------------------------------
2991
+ Adds basic styling for the following
2992
+ unclassed elements:
2993
+
2994
+ - paragraph: paragraph text
2995
+ - link: links
2996
+ - content: paragraph text, links,
2997
+ headings, lists, and tables
2998
+ ----------------------------------------
2999
+ */
3000
+ /*
3001
+ ----------------------------------------
3002
+ Broswer compatibility mode
3003
+ ----------------------------------------
3004
+ When true, outputs woff and ttf font
3005
+ formats in addition to woff2
3006
+ ----------------------------------------
3007
+ */
3008
+ /*
3009
+ ----------------------------------------
3010
+ Font path
3011
+ ----------------------------------------
3012
+ Relative font file path
3013
+ ----------------------------------------
3014
+ */
3015
+ /*
3016
+ ----------------------------------------
3017
+ Custom typeface tokens
3018
+ ----------------------------------------
3019
+ Add a new custom typeface token if
3020
+ your project uses a typeface not already
3021
+ defined by USWDS.
3022
+ ----------------------------------------
3023
+ USWDS defines the following tokens
3024
+ by default:
3025
+ ----------------------------------------
3026
+ 'georgia'
3027
+ 'helvetica'
3028
+ 'merriweather'
3029
+ 'open-sans'
3030
+ 'public-sans'
3031
+ 'roboto-mono'
3032
+ 'source-sans-pro'
3033
+ 'system'
3034
+ 'tahoma'
3035
+ 'verdana'
3036
+ ----------------------------------------
3037
+ Add as many new tokens as you have
3038
+ custom typefaces. Reference your new
3039
+ token(s) in the type-based font settings
3040
+ using the quoted name of the token.
3041
+
3042
+ For example:
3043
+
3044
+ $theme-font-type-cond: 'example-font-token';
3045
+
3046
+ display-name:
3047
+ The display name of your font
3048
+
3049
+ cap-height:
3050
+ The height of a 500px `N` in Sketch
3051
+ ----------------------------------------
3052
+ You should change `example-[style]-token`
3053
+ names to something more descriptive.
3054
+ ----------------------------------------
3055
+ */
3056
+ /*
3057
+ ----------------------------------------
3058
+ Type-based font settings
3059
+ ----------------------------------------
3060
+ Set the type-based tokens for your
3061
+ project from the following tokens,
3062
+ or from any new font tokens you added in
3063
+ $theme-typeface-tokens.
3064
+ ----------------------------------------
3065
+ 'georgia'
3066
+ 'helvetica'
3067
+ 'merriweather'
3068
+ 'open-sans'
3069
+ 'public-sans'
3070
+ 'roboto-mono'
3071
+ 'source-sans-pro'
3072
+ 'system'
3073
+ 'tahoma'
3074
+ 'verdana'
3075
+ ----------------------------------------
3076
+ */
3077
+ /*
3078
+ ----------------------------------------
3079
+ Custom font stacks
3080
+ ----------------------------------------
3081
+ Add custom font stacks to any of the
3082
+ type-based fonts. Any USWDS typeface
3083
+ token already has a default stack.
3084
+
3085
+ Custom stacks don't need to include the
3086
+ font's display name. It will
3087
+ automatically appear at the start of
3088
+ the stack.
3089
+ ----------------------------------------
3090
+ Example:
3091
+ $theme-font-type-sans: 'source-sans-pro';
3092
+ $theme-font-sans-custom-stack: "Helvetica Neue", Helvetica, Arial, sans;
3093
+
3094
+ Output:
3095
+ font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;
3096
+ ----------------------------------------
3097
+ */
3098
+ /*
3099
+ ----------------------------------------
3100
+ Add any custom font source files
3101
+ ----------------------------------------
3102
+ If you want USWDS to generate additional
3103
+ @font-face declarations, add your font
3104
+ data below, following the example that
3105
+ follows.
3106
+ ----------------------------------------
3107
+ USWDS automatically generates @font-face
3108
+ declarations for the following
3109
+
3110
+ 'merriweather'
3111
+ 'public-sans'
3112
+ 'roboto-mono'
3113
+ 'source-sans-pro'
3114
+
3115
+ These typefaces not require custom
3116
+ source files.
3117
+ ----------------------------------------
3118
+ EXAMPLE
3119
+
3120
+ - dir:
3121
+ Directory relative to $theme-font-path
3122
+ - This directory should include fonts saved as
3123
+ .woff2
3124
+ ExampleSerif-Normal.woff2
3125
+
3126
+ $theme-font-serif-custom-src: (
3127
+ dir: 'custom/example-serif',
3128
+ roman: (
3129
+ 100: false,
3130
+ 200: false,
3131
+ 300: 'ExampleSerif-Light',
3132
+ 400: 'ExampleSerif-Normal',
3133
+ 500: false,
3134
+ 600: false,
3135
+ 700: 'ExampleSerif-Bold',
3136
+ 800: false,
3137
+ 900: false,
3138
+ ),
3139
+ italic: (
3140
+ 100: false,
3141
+ 200: false,
3142
+ 300: 'ExampleSerif-LightItalic',
3143
+ 400: 'ExampleSerif-Italic',
3144
+ 500: false,
3145
+ 600: false,
3146
+ 700: 'ExampleSerif-BoldItalic',
3147
+ 800: false,
3148
+ 900: false,
3149
+ ),
3150
+ );
3151
+ ----------------------------------------
3152
+ */
3153
+ /*
3154
+ ----------------------------------------
3155
+ Role-based font settings
3156
+ ----------------------------------------
3157
+ Set the role-based tokens for your
3158
+ project from the following font-type
3159
+ tokens.
3160
+ ----------------------------------------
3161
+ 'cond'
3162
+ 'icon'
3163
+ 'lang'
3164
+ 'mono'
3165
+ 'sans'
3166
+ 'serif'
3167
+ ----------------------------------------
3168
+ */
3169
+ /*
3170
+ ----------------------------------------
3171
+ Type scale
3172
+ ----------------------------------------
3173
+ Define your project's type scale using
3174
+ values from the USWDS system type scale
3175
+
3176
+ 1-20
3177
+ ----------------------------------------
3178
+ */
3179
+ /*
3180
+ ----------------------------------------
3181
+ Font weights
3182
+ ----------------------------------------
3183
+ Assign weights 100-900
3184
+ Or use `false` for unneeded weights.
3185
+ ----------------------------------------
3186
+ */
3187
+ /*
3188
+ ----------------------------------------
3189
+ General typography settings
3190
+ ----------------------------------------
3191
+ Type scale tokens
3192
+ ----------------------------------------
3193
+ micro: 10px
3194
+ 1: 12px
3195
+ 2: 13px
3196
+ 3: 14px
3197
+ 4: 15px
3198
+ 5: 16px
3199
+ 6: 17px
3200
+ 7: 18px
3201
+ 8: 20px
3202
+ 9: 22px
3203
+ 10: 24px
3204
+ 11: 28px
3205
+ 12: 32px
3206
+ 13: 36px
3207
+ 14: 40px
3208
+ 15: 48px
3209
+ 16: 56px
3210
+ 17: 64px
3211
+ 18: 80px
3212
+ 19: 120px
3213
+ 20: 140px
3214
+ ----------------------------------------
3215
+ Line height tokens
3216
+ ----------------------------------------
3217
+ 1: 1
3218
+ 2: 1.15
3219
+ 3: 1.35
3220
+ 4: 1.5
3221
+ 5: 1.62
3222
+ 6: 1.75
3223
+ ----------------------------------------
3224
+ Font role tokens
3225
+ ----------------------------------------
3226
+ 'ui'
3227
+ 'heading'
3228
+ 'body'
3229
+ 'code'
3230
+ 'alt'
3231
+ ----------------------------------------
3232
+ Measure (max-width) tokens
3233
+ ----------------------------------------
3234
+ 1: 44ex
3235
+ 2: 60ex
3236
+ 3: 64ex
3237
+ 4: 68ex
3238
+ 5: 74ex
3239
+ 6: 88ex
3240
+ none: none
3241
+ ----------------------------------------
3242
+ */
3243
+ /*
3244
+ * * * * * ==============================
3245
+ * * * * * ==============================
3246
+ * * * * * ==============================
3247
+ * * * * * ==============================
3248
+ ========================================
3249
+ ========================================
3250
+ ========================================
3251
+ ----------------------------------------
3252
+ COLOR SETTINGS
3253
+ ----------------------------------------
3254
+ Read more about settings and
3255
+ USWDS color tokens in the documentation:
3256
+ https://designsystem.digital.gov/design-tokens/color
3257
+ ----------------------------------------
3258
+ */
3259
+ /*
3260
+ ----------------------------------------
3261
+ Theme palette colors
3262
+ ----------------------------------------
3263
+ */
3264
+ /*
3265
+ ----------------------------------------
3266
+ State palette colors
3267
+ ----------------------------------------
3268
+ */
3269
+ /*
3270
+ ----------------------------------------
3271
+ General colors
3272
+ ----------------------------------------
3273
+ */
3274
+ /*
3275
+ * * * * * ==============================
3276
+ * * * * * ==============================
3277
+ * * * * * ==============================
3278
+ * * * * * ==============================
3279
+ ========================================
3280
+ ========================================
3281
+ ========================================
3282
+ ----------------------------------------
3283
+ COMPONENT SETTINGS
3284
+ ----------------------------------------
3285
+ Read more about settings and
3286
+ USWDS style tokens in the documentation:
3287
+ https://designsystem.digital.gov/design-tokens
3288
+ ----------------------------------------
3289
+ */
3290
+ /*
3291
+ * * * * * ==============================
3292
+ * * * * * ==============================
3293
+ * * * * * ==============================
3294
+ * * * * * ==============================
3295
+ ========================================
3296
+ ========================================
3297
+ ========================================
3298
+ ----------------------------------------
3299
+ SPACING SETTINGS
3300
+ ----------------------------------------
3301
+ Read more about settings and
3302
+ USWDS spacing units tokens in the
3303
+ documentation:
3304
+ https://designsystem.digital.gov/design-tokens/spacing-units
3305
+ ----------------------------------------
3306
+ */
3307
+ /*
3308
+ ----------------------------------------
3309
+ Border radius
3310
+ ----------------------------------------
3311
+ 2px 2px
3312
+ 0.5 4px
3313
+ 1 8px
3314
+ 1.5 12px
3315
+ 2 16px
3316
+ 2.5 20px
3317
+ 3 24px
3318
+ 4 32px
3319
+ 5 40px
3320
+ 6 48px
3321
+ 7 56px
3322
+ 8 64px
3323
+ 9 72px
3324
+ ----------------------------------------
3325
+ */
3326
+ /*
3327
+ ----------------------------------------
3328
+ Column gap
3329
+ ----------------------------------------
3330
+ 2px 2px
3331
+ 0.5 4px
3332
+ 1 8px
3333
+ 2 16px
3334
+ 3 24px
3335
+ 4 32px
3336
+ 5 40px
3337
+ 6 48px
3338
+ ----------------------------------------
3339
+ */
3340
+ /*
3341
+ ----------------------------------------
3342
+ Grid container max-width
3343
+ ----------------------------------------
3344
+ mobile
3345
+ mobile-lg
3346
+ tablet
3347
+ tablet-lg
3348
+ desktop
3349
+ desktop-lg
3350
+ widescreen
3351
+ ----------------------------------------
3352
+ */
3353
+ /*
3354
+ ----------------------------------------
3355
+ Site
3356
+ ----------------------------------------
3357
+ */
3358
+ /*
3359
+ * * * * * ==============================
3360
+ * * * * * ==============================
3361
+ * * * * * ==============================
3362
+ * * * * * ==============================
3363
+ ========================================
3364
+ ========================================
3365
+ ========================================
3366
+ ----------------------------------------
3367
+ UTILITIES SETTINGS
3368
+ ----------------------------------------
3369
+ Read more about settings and
3370
+ USWDS utilities in the documentation:
3371
+ https://designsystem.digital.gov/utilities
3372
+ ----------------------------------------
3373
+ */
3374
+ /*
3375
+ ----------------------------------------
3376
+ map-collect()
3377
+ ----------------------------------------
3378
+ Collect multiple maps into a single
3379
+ large map
3380
+ source: https://gist.github.com/bigglesrocks/d75091700f8f2be5abfe
3381
+ ----------------------------------------
3382
+ */
3383
+ /*
3384
+ ----------------------------------------
3385
+ Utility breakpoints
3386
+ ----------------------------------------
3387
+ Which breakpoints does your project
3388
+ need? Select as `true` any breakpoint
3389
+ used by utilities or layout grid
3390
+ ----------------------------------------
3391
+ */
3392
+ /*
3393
+ ----------------------------------------
3394
+ Global colors
3395
+ ----------------------------------------
3396
+ The following palettes will be added to
3397
+ - background-color
3398
+ - border-color
3399
+ - color
3400
+ - text-decoration-color
3401
+ ----------------------------------------
3402
+ */
3403
+ /*
3404
+ ----------------------------------------
3405
+ Settings
3406
+ ----------------------------------------
3407
+ */
3408
+ /*
3409
+ ----------------------------------------
3410
+ Values
3411
+ ----------------------------------------
3412
+ */
3413
+ /*
3414
+ ----------------------------------------
3415
+ has-important()
3416
+ ----------------------------------------
3417
+ Check to see if `!important` is
3418
+ being passed in a mixin's props
3419
+ ----------------------------------------
3420
+ */
3421
+ /*
3422
+ ----------------------------------------
3423
+ map-deep-get()
3424
+ ----------------------------------------
3425
+ @author Hugo Giraudel
3426
+ @access public
3427
+ @param {Map} $map - Map
3428
+ @param {Arglist} $keys - Key chain
3429
+ @return {*} - Desired value
3430
+ ----------------------------------------
3431
+ */
3432
+ /*
3433
+ ----------------------------------------
3434
+ multi-cat()
3435
+ ----------------------------------------
3436
+ Concatenate two lists
3437
+ ----------------------------------------
3438
+ */
3439
+ /*
3440
+ ----------------------------------------
3441
+ remove()
3442
+ ----------------------------------------
3443
+ Remove a value from a list
3444
+ ----------------------------------------
3445
+ */
3446
+ /*
3447
+ ----------------------------------------
3448
+ smart-quote()
3449
+ ----------------------------------------
3450
+ Quotes strings
3451
+ Inspects `px`, `xs`, and `xl` numbers
3452
+ Leaves bools as is
3453
+ ----------------------------------------
3454
+ */
3455
+ /*
3456
+ ----------------------------------------
3457
+ str-replace()
3458
+ ----------------------------------------
3459
+ Replace any substring with another
3460
+ string
3461
+ ----------------------------------------
3462
+ */
3463
+ /*
3464
+ ----------------------------------------
3465
+ str-split()
3466
+ ----------------------------------------
3467
+ Split a string at a given separator
3468
+ and convert into a list of substrings
3469
+ ----------------------------------------
3470
+ */
3471
+ /*
3472
+ ----------------------------------------
3473
+ strip-unit()
3474
+ ----------------------------------------
3475
+ Remove the unit of a length
3476
+ @author Hugo Giraudel
3477
+ @param {Number} $number - Number to remove unit from
3478
+ @return {Number} - Unitless number
3479
+ ----------------------------------------
3480
+ */
3481
+ /*
3482
+ ----------------------------------------
3483
+ base-to-map()
3484
+ @TODO: Deprecate and delete
3485
+ ----------------------------------------
3486
+ Convert a single base to a USWDS
3487
+ value map.
3488
+
3489
+ Candidate for deprecation if we remove
3490
+ isReadable
3491
+ ----------------------------------------
3492
+ */
3493
+ /*
3494
+ ----------------------------------------
3495
+ to-number()
3496
+ ----------------------------------------
3497
+ Casts a string into a number
3498
+ ----------------------------------------
3499
+ @param {String | Number} $value - Value to be parsed
3500
+ @return {Number}
3501
+ ----------------------------------------
3502
+ */
3503
+ /*
3504
+ ----------------------------------------
3505
+ unpack()
3506
+ ----------------------------------------
3507
+ Create lists of single items from lists
3508
+ of lists.
3509
+ ----------------------------------------
3510
+ (1, (2.1, 2.2), 3) -->
3511
+ (1, 2.1, 2.2, 3)
3512
+ ----------------------------------------
3513
+ */
3514
+ /*
3515
+ ----------------------------------------
3516
+ color()
3517
+ ----------------------------------------
3518
+ Derive a color from a color shortcode
3519
+ ----------------------------------------
3520
+ */
3521
+ /*
3522
+ ----------------------------------------
3523
+ get-system-color()
3524
+ ----------------------------------------
3525
+ Derive a system color from its
3526
+ family, value, and vivid or a passed
3527
+ variable that is, itself, a list
3528
+ ----------------------------------------
3529
+ */
3530
+ /*
3531
+ ----------------------------------------
3532
+ color()
3533
+ ----------------------------------------
3534
+ Derive a color from a color shortcode
3535
+ ----------------------------------------
3536
+ */
3537
+ /*
3538
+ ----------------------------------------
3539
+ advanced-color()
3540
+ ----------------------------------------
3541
+ Derive a color from a color triplet:
3542
+ [family], [grade], [variant]
3543
+ ----------------------------------------
3544
+ */
3545
+ /*
3546
+ ----------------------------------------
3547
+ Luminance ranges
3548
+ ----------------------------------------
3549
+ */
3550
+ /*
3551
+ ----------------------------------------
3552
+ calculate-grade()
3553
+ ----------------------------------------
3554
+ Derive the grade equivalent any color,
3555
+ even non-token colors
3556
+ ----------------------------------------
3557
+ */
3558
+ /*
3559
+ ----------------------------------------
3560
+ color-token-assignment()
3561
+ ----------------------------------------
3562
+ Get the system token equivalent of any
3563
+ theme color token
3564
+ ----------------------------------------
3565
+ */
3566
+ /*
3567
+ ----------------------------------------
3568
+ is-system-color-token()
3569
+ ----------------------------------------
3570
+ Return whether a token is a system
3571
+ color token
3572
+ ----------------------------------------
3573
+ */
3574
+ /*
3575
+ ----------------------------------------
3576
+ color()
3577
+ ----------------------------------------
3578
+ Derive a color from a color shortcode
3579
+ ----------------------------------------
3580
+ */
3581
+ /*
3582
+ ----------------------------------------
3583
+ color()
3584
+ ----------------------------------------
3585
+ Derive a color from a color shortcode
3586
+ ----------------------------------------
3587
+ */
3588
+ /*
3589
+ ----------------------------------------
3590
+ set-theme-color()
3591
+ ----------------------------------------
3592
+ Derive a color from a system color token
3593
+ or a hex value
3594
+ ----------------------------------------
3595
+ */
3596
+ /*
3597
+ ----------------------------------------
3598
+ is-theme-color-token()
3599
+ ----------------------------------------
3600
+ Return whether a token is a theme
3601
+ color token
3602
+ ----------------------------------------
3603
+ */
3604
+ /*
3605
+ ----------------------------------------
3606
+ color-token-family()
3607
+ ----------------------------------------
3608
+ Returns the family of a color token.
3609
+ Returns: color-family
3610
+ color-token-family("accent-warm-vivid")
3611
+ > "accent-warm"
3612
+ color-token-family("red-50v")
3613
+ > "red"
3614
+ color-token-variant(("red", 50, "vivid"))
3615
+ > "red"
3616
+ ----------------------------------------
3617
+ */
3618
+ /*
3619
+ ----------------------------------------
3620
+ decompose()
3621
+ ----------------------------------------
3622
+ Convert a color token into into a list
3623
+ of form [family], [grade], [variant]
3624
+ Vivid variants return "vivid" as the
3625
+ variant.
3626
+ If neither grade nor variant exists,
3627
+ returns 'null'
3628
+ ----------------------------------------
3629
+ */
3630
+ /*
3631
+ ----------------------------------------
3632
+ color-token-family()
3633
+ ----------------------------------------
3634
+ Returns the family of a color token.
3635
+ Returns: color-family
3636
+ color-token-family("accent-warm-vivid")
3637
+ > "accent-warm"
3638
+ color-token-family("red-50v")
3639
+ > "red"
3640
+ color-token-variant(("red", 50, "vivid"))
3641
+ > "red"
3642
+ ----------------------------------------
3643
+ */
3644
+ /*
3645
+ ----------------------------------------
3646
+ color-token-grade()
3647
+ ----------------------------------------
3648
+ Returns the grade of a USWDS color token.
3649
+ Returns: color-grade
3650
+ color-token-grade("accent-warm")
3651
+ > "root"
3652
+ color-token-grade("accent-warm-vivid")
3653
+ > "root"
3654
+ color-token-grade("accent-warm-darker")
3655
+ > "darker"
3656
+ color-token-grade("red-50v")
3657
+ > 50
3658
+ color-token-variant(("red", 50, "vivid"))
3659
+ > 50
3660
+ ----------------------------------------
3661
+ */
3662
+ /*
3663
+ ----------------------------------------
3664
+ color-token-family()
3665
+ ----------------------------------------
3666
+ Returns the family of a color token.
3667
+ Returns: color-family
3668
+ color-token-family("accent-warm-vivid")
3669
+ > "accent-warm"
3670
+ color-token-family("red-50v")
3671
+ > "red"
3672
+ color-token-variant(("red", 50, "vivid"))
3673
+ > "red"
3674
+ ----------------------------------------
3675
+ */
3676
+ /*
3677
+ ----------------------------------------
3678
+ color()
3679
+ ----------------------------------------
3680
+ Derive a color from a color shortcode
3681
+ ----------------------------------------
3682
+ */
3683
+ /*
3684
+ ----------------------------------------
3685
+ is-color-token()
3686
+ ----------------------------------------
3687
+ Returns whether a given string is a
3688
+ USWDS color token.
3689
+ ----------------------------------------
3690
+ */
3691
+ /*
3692
+ ----------------------------------------
3693
+ pow()
3694
+ ----------------------------------------
3695
+ Raises a unitless number to the power
3696
+ of another unitless number
3697
+ Includes helper functions
3698
+ ----------------------------------------
3699
+ */
3700
+ /*
3701
+ ----------------------------------------
3702
+ Helper functions
3703
+ ----------------------------------------
3704
+ */
3705
+ /* factorial()
3706
+ ----------------------------------------
3707
+ */
3708
+ /* summation()
3709
+ ----------------------------------------
3710
+ */
3711
+ /* exp-maclaurin()
3712
+ ----------------------------------------
3713
+ */
3714
+ /* ln()
3715
+ ----------------------------------------
3716
+ */
3717
+ /*
3718
+ ----------------------------------------
3719
+ color-token-type()
3720
+ ----------------------------------------
3721
+ Returns the type of a color token.
3722
+ Returns: "system" | "theme"
3723
+ ----------------------------------------
3724
+ */
3725
+ /*
3726
+ ----------------------------------------
3727
+ color-token-variant()
3728
+ ----------------------------------------
3729
+ Returns the variant of color token.
3730
+ Returns: "vivid" | false
3731
+ color-token-variant("accent-warm")
3732
+ > false
3733
+ color-token-variant("accent-warm-vivid")
3734
+ > "vivid"
3735
+ color-token-variant("red-50v")
3736
+ > "vivid"
3737
+ color-token-variant(("red", 50, "vivid"))
3738
+ > "vivid"
3739
+ ----------------------------------------
3740
+ */
3741
+ /*
3742
+ ----------------------------------------
3743
+ magic-number()
3744
+ ----------------------------------------
3745
+ Returns the magic number of two color
3746
+ grades. Takes numbers or color tokens.
3747
+ magic-number(50, 10)
3748
+ return: 40
3749
+ magic-number("red-50", "red-10")
3750
+ return: 40
3751
+ ----------------------------------------
3752
+ */
3753
+ /*
3754
+ ----------------------------------------
3755
+ is-accessible-magic-number()
3756
+ ----------------------------------------
3757
+ Returns whether two grades achieve
3758
+ specified target color contrast
3759
+ Returns: true | false
3760
+ is-accessible-magic-number(10, 50, "AA")
3761
+ > false
3762
+ is-accessible-magic-number(10, 60, "AA")
3763
+ > true
3764
+ ----------------------------------------
3765
+ */
3766
+ /*
3767
+ ----------------------------------------
3768
+ wcag-magic-number()
3769
+ ----------------------------------------
3770
+ Returns the magic number of a specific
3771
+ wcag grade:
3772
+ "AA"
3773
+ "AA-Large"
3774
+ "AAA"
3775
+ wcag-magic-number("AA")
3776
+ > 50
3777
+ ----------------------------------------
3778
+ */
3779
+ /*
3780
+ ----------------------------------------
3781
+ get-link-tokens-from-bg()
3782
+ ----------------------------------------
3783
+ Get accessible link colors for a given
3784
+ background color
3785
+ returns: link-token, hover-token
3786
+ get-link-tokens-from-bg(
3787
+ "black",
3788
+ "red-60",
3789
+ "red-10",
3790
+ "AA")
3791
+ > "red-10", "red-5"
3792
+ get-link-tokens-from-bg(
3793
+ "black",
3794
+ "red-60v",
3795
+ "red-10v",
3796
+ "AA-large")
3797
+ > "red-60v", "red-50v"
3798
+ get-link-tokens-from-bg(
3799
+ "black",
3800
+ "red-5v",
3801
+ "red-60v",
3802
+ "AA")
3803
+ > "red-5v", "white"
3804
+ get-link-tokens-from-bg(
3805
+ "black",
3806
+ "white",
3807
+ "red-60v",
3808
+ "AA")
3809
+ > "white", "white"
3810
+ ----------------------------------------
3811
+ */
3812
+ /*
3813
+ ----------------------------------------
3814
+ next-token()
3815
+ ----------------------------------------
3816
+ Returns next "darker" or "lighter" color
3817
+ token of the same token type and variant.
3818
+ Returns: color-token | false
3819
+ next-token("accent-warm", "lighter")
3820
+ > "accent-warm-light"
3821
+ next-token("gray-10", "lighter")
3822
+ > "gray-5"
3823
+ next-token("gray-5", "lighter")
3824
+ > "white"
3825
+ next-token("white", "lighter")
3826
+ > false
3827
+ next-token("red-50v", "darker")
3828
+ > "red-60v"
3829
+ next-token("red-50", "darker")
3830
+ > "red-60"
3831
+ next-token("red-80v", "darker")
3832
+ > "red-90"
3833
+ next-token("red-90", "darker")
3834
+ > "black"
3835
+ next-token("white", "darker")
3836
+ > "gray-5"
3837
+ next-token("black", "lighter")
3838
+ > "gray-90"
3839
+ ----------------------------------------
3840
+ */
3841
+ /*
3842
+ ----------------------------------------
3843
+ color()
3844
+ ----------------------------------------
3845
+ Derive a color from a color shortcode
3846
+ ----------------------------------------
3847
+ */
3848
+ /*
3849
+ ----------------------------------------
3850
+ test-colors()
3851
+ ----------------------------------------
3852
+ Check to see if all system colors
3853
+ fall between the proper relative
3854
+ luminance range for their grade.
3855
+ Has a couple quirks, as the luminance()
3856
+ function returns slightly different
3857
+ results than expected.
3858
+ ----------------------------------------
3859
+ */
3860
+ /*
3861
+ ----------------------------------------
3862
+ Line height
3863
+ ----------------------------------------
3864
+ */
3865
+ /*
3866
+ ----------------------------------------
3867
+ Measure
3868
+ ----------------------------------------
3869
+ */
3870
+ /*
3871
+ ----------------------------------------
3872
+ spacing-multiple()
3873
+ ----------------------------------------
3874
+ Converts a spacing unit multiple into
3875
+ the desired final units (currently rem)
3876
+ ----------------------------------------
3877
+ */
3878
+ /*
3879
+ ----------------------------------------
3880
+ cap-height()
3881
+ ----------------------------------------
3882
+ Get the cap height of a valid typeface
3883
+ ----------------------------------------
3884
+ */
3885
+ /*
3886
+ ----------------------------------------
3887
+ validate-typeface-token()
3888
+ ----------------------------------------
3889
+ Check to see if a typeface-token exists.
3890
+ Throw an error if a passed token does
3891
+ not exist in the typeface-token map.
3892
+ ----------------------------------------
3893
+ */
3894
+ /*
3895
+ ----------------------------------------
3896
+ convert-to-font-type()
3897
+ ----------------------------------------
3898
+ Converts a font-role token into a
3899
+ font-type token. Leaves font-type tokens
3900
+ unchanged.
3901
+ ----------------------------------------
3902
+ */
3903
+ /*
3904
+ ----------------------------------------
3905
+ font-sources()
3906
+ ----------------------------------------
3907
+ Outputs a list of font sources used in
3908
+ a @font-face declaration.
3909
+
3910
+ $theme-font-browser-compatibility: true - output woff2, woff, ttf
3911
+ $theme-font-browser-compatibility: false - output woff2
3912
+
3913
+ @param stem: string - [font path]/[custom-src.dir]/[custom-src.[style].[weight]]
3914
+ @output: string
3915
+
3916
+ filetypes must be one of the filetypes set in variables/$project-font-face-filetypes (woff, woff2, ttf)
3917
+ ----------------------------------------
3918
+ */
3919
+ /*
3920
+ ----------------------------------------
3921
+ Project fonts
3922
+ ----------------------------------------
3923
+ Collects font settings in a map for
3924
+ looping.
3925
+ ----------------------------------------
3926
+ */
3927
+ /*
3928
+ ----------------------------------------
3929
+ get-font-stack()
3930
+ ----------------------------------------
3931
+ Get a font stack from a style- or
3932
+ role-based font token.
3933
+ ----------------------------------------
3934
+ */
3935
+ /*
3936
+ ----------------------------------------
3937
+ get-typeface-token()
3938
+ ----------------------------------------
3939
+ Get a typeface token from a font-type or
3940
+ font-role token.
3941
+ ----------------------------------------
3942
+ */
3943
+ /*
3944
+ ----------------------------------------
3945
+ px-to-rem()
3946
+ ----------------------------------------
3947
+ Converts a value in px to a value in rem
3948
+ ----------------------------------------
3949
+ */
3950
+ /*
3951
+ ----------------------------------------
3952
+ rem-to-user-em()
3953
+ ----------------------------------------
3954
+ Converts a value in rem to a value in
3955
+ [user-settings] em for use in media
3956
+ queries
3957
+ ----------------------------------------
3958
+ */
3959
+ /*
3960
+ ----------------------------------------
3961
+ px-to-user-em()
3962
+ ----------------------------------------
3963
+ Converts a value in px to a value in em
3964
+ ----------------------------------------
3965
+ */
3966
+ /*
3967
+ ----------------------------------------
3968
+ rem-to-px()
3969
+ ----------------------------------------
3970
+ Converts a value in rem to a value in px
3971
+ ----------------------------------------
3972
+ */
3973
+ /*
3974
+ ----------------------------------------
3975
+ units()
3976
+ ----------------------------------------
3977
+ Converts a spacing unit into
3978
+ the desired final units (currently rem)
3979
+ ----------------------------------------
3980
+ */
3981
+ /*
3982
+ ----------------------------------------
3983
+ number-to-token()
3984
+ ----------------------------------------
3985
+ Converts an integer or numeric value
3986
+ into a system value
3987
+
3988
+ Ex: 0.5 --> '05'
3989
+ -1px --> 'neg-1px'
3990
+ ----------------------------------------
3991
+ */
3992
+ /*
3993
+ ----------------------------------------
3994
+ normalize-type-scale()
3995
+ ----------------------------------------
3996
+ Normalizes a specific face's optical size
3997
+ to a set target
3998
+ ----------------------------------------
3999
+ */
4000
+ /*
4001
+ ----------------------------------------
4002
+ system-type-scale()
4003
+ ----------------------------------------
4004
+ Get a value from the system type scale
4005
+ ----------------------------------------
4006
+ */
4007
+ /*
4008
+ ----------------------------------------
4009
+ columns()
4010
+ ----------------------------------------
4011
+ outputs a grid-col number based on
4012
+ the number of desired columns in the
4013
+ 12-column grid
4014
+
4015
+ Ex: columns(2) --> 6
4016
+ grid-col(columns(2))
4017
+ ----------------------------------------
4018
+ */
4019
+ /*
4020
+ ----------------------------------------
4021
+ USWDS Properties
4022
+ ----------------------------------------
4023
+ */
4024
+ /*
4025
+ ----------------------------------------
4026
+ get-uswds-value()
4027
+ ----------------------------------------
4028
+ Finds and outputs a value from the
4029
+ USWDS standard values.
4030
+
4031
+ Used to build other standard utility
4032
+ functions and mixins.
4033
+ ----------------------------------------
4034
+ */
4035
+ /*
4036
+ ----------------------------------------
4037
+ get-standard-values()
4038
+ ----------------------------------------
4039
+ Gets a map of USWDS standard values
4040
+ for a property
4041
+ ----------------------------------------
4042
+ */
4043
+ /*
4044
+ ----------------------------------------
4045
+ ns()
4046
+ ----------------------------------------
4047
+ Add a namesspace of $type if that
4048
+ namespace is set to output
4049
+ ----------------------------------------
4050
+ */
4051
+ /*
4052
+ ----------------------------------------
4053
+ border-radius()
4054
+ ----------------------------------------
4055
+ Get a border-radius from the system
4056
+ border-radii
4057
+ ----------------------------------------
4058
+ */
4059
+ /*
4060
+ ----------------------------------------
4061
+ font-weight()
4062
+ fw()
4063
+ ----------------------------------------
4064
+ Get a font-weight value from the
4065
+ system font-weight
4066
+ ----------------------------------------
4067
+ */
4068
+ /*
4069
+ ----------------------------------------
4070
+ feature()
4071
+ ----------------------------------------
4072
+ Gets a valid USWDS font feature setting
4073
+ ----------------------------------------
4074
+ */
4075
+ /*
4076
+ ----------------------------------------
4077
+ flex()
4078
+ ----------------------------------------
4079
+ Gets a valid USWDS flex value
4080
+ ----------------------------------------
4081
+ */
4082
+ /*
4083
+ ----------------------------------------
4084
+ font-family()
4085
+ family()
4086
+ ----------------------------------------
4087
+ Get a font-family stack from a
4088
+ role-based or type-based font family
4089
+ ----------------------------------------
4090
+ */
4091
+ /*
4092
+ ----------------------------------------
4093
+ letter-spacing()
4094
+ ls()
4095
+ ----------------------------------------
4096
+ Get a letter-spacing value from the
4097
+ system letter-spacing
4098
+ ----------------------------------------
4099
+ */
4100
+ /*
4101
+ ----------------------------------------
4102
+ measure()
4103
+ ----------------------------------------
4104
+ Gets a valid USWDS reading line length
4105
+ ----------------------------------------
4106
+ */
4107
+ /*
4108
+ ----------------------------------------
4109
+ opacity()
4110
+ ----------------------------------------
4111
+ Get an opacity from the system
4112
+ opacities
4113
+ ----------------------------------------
4114
+ */
4115
+ /*
4116
+ ----------------------------------------
4117
+ order()
4118
+ ----------------------------------------
4119
+ Get an order value from the
4120
+ system orders
4121
+ ----------------------------------------
4122
+ */
4123
+ /*
4124
+ ----------------------------------------
4125
+ radius()
4126
+ ----------------------------------------
4127
+ Get a border-radius value from the
4128
+ system letter-spacing
4129
+ ----------------------------------------
4130
+ */
4131
+ /*
4132
+ ----------------------------------------
4133
+ font-size()
4134
+ ----------------------------------------
4135
+ Get type scale value from a [family] and
4136
+ [scale]
4137
+ ----------------------------------------
4138
+ */
4139
+ /*
4140
+ ----------------------------------------
4141
+ z-index()
4142
+ z()
4143
+ ----------------------------------------
4144
+ Get a z-index value from the
4145
+ system z-index
4146
+ ----------------------------------------
4147
+ */
4148
+ /*
4149
+ ----------------------------------------
4150
+ utility-font()
4151
+ ----------------------------------------
4152
+ Get a normalized font-size in rem from
4153
+ a family and a type size in either
4154
+ system scale or project scale
4155
+ ----------------------------------------
4156
+ Not the public-facing function.
4157
+ Used for building the utilities and
4158
+ withholds certain errors.
4159
+ ----------------------------------------
4160
+ */
4161
+ /*
4162
+ ----------------------------------------
4163
+ family()
4164
+ ----------------------------------------
4165
+ Get a font-family stack
4166
+ ----------------------------------------
4167
+ */
4168
+ /*
4169
+ ----------------------------------------
4170
+ size()
4171
+ ----------------------------------------
4172
+ Get a normalized font-size in rem from
4173
+ a family and a type size in either
4174
+ system scale or project scale
4175
+ ----------------------------------------
4176
+ */
4177
+ /*
4178
+ ----------------------------------------
4179
+ font()
4180
+ ----------------------------------------
4181
+ Get a font-family stack
4182
+ AND
4183
+ Get a normalized font-size in rem from
4184
+ a family and a type size in either
4185
+ system scale or project scale
4186
+ ----------------------------------------
4187
+ */
4188
+ /*
4189
+ ----------------------------------------
4190
+ typeset()
4191
+ ----------------------------------------
4192
+ Sets:
4193
+ - family
4194
+ - size
4195
+ - line-height
4196
+ ----------------------------------------
4197
+ */
4198
+ /**
4199
+ Normalization for Source Sans Pro typeface.
4200
+
4201
+ Typefaces vary in optical size. This means that at any
4202
+ specific pixel value, an optically small typeface like
4203
+ Source Sans Pro will appear smaller than an optically
4204
+ large typeface like Merriweather.
4205
+
4206
+ The `typeset()` mixin will calculate the appropriate
4207
+ font-size for a given typeface. The `ui` value will
4208
+ use the default value for $theme-body-font-family.
4209
+
4210
+ font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
4211
+ font-size: 1.06rem;
4212
+ line-height: 1.5;
4213
+
4214
+ https://designsystem.digital.gov/design-tokens/typesetting/overview/
4215
+ */
4216
+ p, a, ol, ul, li, dl, dt, dd, form, label, button {
4217
+ font-family: Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;
4218
+ font-size: 1.06rem;
4219
+ line-height: 1.5;
4220
+ }
4221
+
4222
+ /*# sourceMappingURL=uswds-typography.css.map */