|
10 | 10 | // Heading mixins for use within components
|
11 | 11 | // These match heading utilities in utilities/typography
|
12 | 12 | @mixin h1 {
|
13 |
| - font-size: $h1-size; |
| 13 | + font-size: var(--h1-size, $h1-size); |
14 | 14 | font-weight: $font-weight-bold;
|
15 | 15 | }
|
16 | 16 |
|
17 | 17 | @mixin h2 {
|
18 |
| - font-size: $h2-size; |
| 18 | + font-size: var(--h2-size, $h2-size); |
19 | 19 | font-weight: $font-weight-bold;
|
20 | 20 | }
|
21 | 21 |
|
22 | 22 | @mixin h3 {
|
23 |
| - font-size: $h3-size; |
| 23 | + font-size: var(--h3-size, $h3-size); |
24 | 24 | font-weight: $font-weight-bold;
|
25 | 25 | }
|
26 | 26 |
|
27 | 27 | @mixin h4 {
|
28 |
| - font-size: $h4-size; |
| 28 | + font-size: var(--h4-size, $h4-size); |
29 | 29 | font-weight: $font-weight-bold;
|
30 | 30 | }
|
31 | 31 |
|
32 | 32 | @mixin h5 {
|
33 |
| - font-size: $h5-size; |
| 33 | + font-size: var(--h5-size, $h5-size); |
34 | 34 | font-weight: $font-weight-bold;
|
35 | 35 | }
|
36 | 36 |
|
37 | 37 | @mixin h6 {
|
38 |
| - font-size: $h6-size; |
| 38 | + font-size: var(--h6-size, $h6-size); |
39 | 39 | font-weight: $font-weight-bold;
|
40 | 40 | }
|
41 | 41 |
|
42 | 42 | // Responsive heading mixins
|
43 | 43 | // There are no responsive mixins for h4-h6 because they are small
|
44 | 44 | // and don't need to be smaller on mobile.
|
45 | 45 | @mixin f1-responsive {
|
46 |
| - font-size: $h1-size-mobile; |
| 46 | + font-size: var(--h1-size-mobile, $h1-size-mobile); |
47 | 47 |
|
48 | 48 | // 32px on desktop
|
49 |
| - @include breakpoint(md) { font-size: $h1-size; } |
| 49 | + @include breakpoint(md) { |
| 50 | + font-size: var(--h1-size, $h1-size); |
| 51 | + } |
50 | 52 | }
|
51 | 53 |
|
52 | 54 | @mixin f2-responsive {
|
53 |
| - font-size: $h2-size-mobile; |
| 55 | + font-size: var(--h2-size-mobile, $h2-size-mobile); |
54 | 56 |
|
55 | 57 | // 24px on desktop
|
56 |
| - @include breakpoint(md) { font-size: $h2-size; } |
| 58 | + @include breakpoint(md) { |
| 59 | + font-size: var(--h2-size, $h2-size); |
| 60 | + } |
57 | 61 | }
|
58 | 62 |
|
59 | 63 | @mixin f3-responsive {
|
60 |
| - font-size: $h3-size-mobile; |
| 64 | + font-size: var(--h3-size-mobile, $h3-size-mobile); |
61 | 65 |
|
62 | 66 | // 20px on desktop
|
63 |
| - @include breakpoint(md) { font-size: $h3-size; } |
| 67 | + @include breakpoint(md) { |
| 68 | + font-size: var(--h3-size, $h3-size); |
| 69 | + } |
64 | 70 | }
|
65 | 71 |
|
66 | 72 | // These use the mixins from above for responsive heading sizes.
|
|
0 commit comments