|
44 | 44 |
|
45 | 45 | // Font face |
46 | 46 | $font-face: true, |
| 47 | + $font-face-path: "./assets/fonts/", |
47 | 48 |
|
48 | 49 | // Base |
49 | 50 | $base-classes: true, |
|
63 | 64 | $tree-view-navigation: true |
64 | 65 | ) { |
65 | 66 | // font-face |
66 | | - @if $font-face == true { |
| 67 | + @if $font-face { |
67 | 68 | @font-face { |
68 | 69 | font-family: SourceSansPro_Regular; // 400 |
69 | | - src: url("./assets/fonts/SourceSansPro_Regular.woff2"); |
| 70 | + src: url("#{$font-face-path}SourceSansPro_Regular.woff2"); |
70 | 71 | } |
71 | 72 |
|
72 | 73 | @font-face { |
73 | | - font-family: SourceSansPro_SemiBold; // 700 |
74 | | - src: url("./assets/fonts/SourceSansPro_SemiBold.woff2"); |
| 74 | + font-family: SourceSansPro_SemiBold; // 600 |
| 75 | + src: url("#{$font-face-path}SourceSansPro_SemiBold.woff2"); |
75 | 76 | } |
76 | 77 |
|
77 | 78 | @font-face { |
78 | 79 | font-family: SourceSansPro_Bold; // 700 |
79 | | - src: url("./assets/fonts/SourceSansPro_Bold.woff2"); |
| 80 | + src: url("#{$font-face-path}SourceSansPro_Bold.woff2"); |
80 | 81 | } |
81 | 82 | } |
82 | 83 |
|
83 | 84 | // Light |
84 | | - @if $light-theme == true and $colors == true and $tokens == true { |
| 85 | + @if $light-theme and $colors and $tokens { |
85 | 86 | @media (prefers-color-scheme: light) { |
86 | 87 | :root { |
87 | 88 | @include foundation-colors--light(); |
|
91 | 92 | } |
92 | 93 |
|
93 | 94 | // Dark |
94 | | - @if $dark-theme == true and $colors == true and $tokens == true { |
| 95 | + @if $dark-theme and $colors and $tokens { |
95 | 96 | @media (prefers-color-scheme: dark) { |
96 | 97 | :root { |
97 | 98 | @include foundation-colors--dark(); |
|
100 | 101 | } |
101 | 102 | } |
102 | 103 |
|
103 | | - :root { |
104 | | - @if $tokens == true { |
| 104 | + @if $tokens and |
| 105 | + ($border-radius or $box-shadow or $colors or $font-size or $spacing) |
| 106 | + { |
| 107 | + :root { |
105 | 108 | // border-radius |
106 | | - @if $border-radius == true { |
| 109 | + @if $border-radius { |
107 | 110 | @include border-radius(); |
108 | 111 | } |
109 | 112 |
|
110 | 113 | // box-shadow |
111 | | - @if $box-shadow == true { |
| 114 | + @if $box-shadow { |
112 | 115 | @include box-shadow(); |
113 | 116 | } |
114 | 117 |
|
115 | 118 | // General colors |
116 | | - @if $colors == true { |
| 119 | + @if $colors { |
117 | 120 | @include semantic-colors--general(); |
118 | 121 | } |
119 | 122 |
|
120 | 123 | // font-size |
121 | | - @if $font-size == true { |
| 124 | + @if $font-size { |
122 | 125 | @include font-size(); |
123 | 126 | } |
124 | 127 |
|
125 | 128 | // spacing |
126 | | - @if $spacing == true { |
| 129 | + @if $spacing { |
127 | 130 | @include spacing(); |
128 | 131 | } |
129 | 132 | } |
130 | 133 | } |
131 | 134 |
|
132 | 135 | // Default background-color and color |
133 | | - @if $tokens == true and $colors == true { |
| 136 | + @if $tokens and $colors { |
134 | 137 | body { |
| 138 | + display: grid; |
| 139 | + min-block-size: 100dvh; |
| 140 | + margin: 0; |
135 | 141 | background-color: var(--surface-un-surface--alternative); |
136 | 142 | color: var(--text-un-text__on-surface--positive); |
137 | 143 |
|
138 | | - @if $font-face == true { |
| 144 | + @if $font-face { |
139 | 145 | font-family: SourceSansPro_Regular; |
140 | 146 | } |
141 | 147 | } |
|
144 | 150 | // - - - - - - - - - - - - - - - - - - - - |
145 | 151 | // Resets |
146 | 152 | // - - - - - - - - - - - - - - - - - - - - |
147 | | - @if $resets == true { |
| 153 | + @if $resets { |
148 | 154 | // box-sizing |
149 | | - @if $box-sizing-reset == true { |
| 155 | + @if $box-sizing-reset { |
150 | 156 | @include box-sizing(); |
151 | 157 | } |
152 | 158 |
|
153 | 159 | // <button> and <a> reset |
154 | | - @if $button-reset == true { |
| 160 | + @if $button-reset { |
155 | 161 | @include button-reset(); |
156 | 162 | } |
157 | 163 |
|
158 | | - @if $input-reset == true { |
| 164 | + @if $input-reset { |
159 | 165 | @include input-reset(); |
160 | 166 | } |
161 | 167 |
|
162 | 168 | // <hr> reset |
163 | | - @if $other-reset == true { |
| 169 | + @if $other-reset { |
164 | 170 | @include other-reset(); |
165 | 171 | } |
166 | 172 |
|
167 | 173 | // Typography reset |
168 | | - @if $typography-reset == true { |
| 174 | + @if $typography-reset { |
169 | 175 | @include typography-reset(); |
170 | 176 | } |
171 | 177 | } |
172 | 178 |
|
173 | 179 | // - - - - - - - - - - - - - - - - - - - - |
174 | 180 | // Base classes |
175 | 181 | // - - - - - - - - - - - - - - - - - - - - |
176 | | - @if $base-classes == true { |
| 182 | + @if $base-classes { |
177 | 183 | // Button classes |
178 | | - @if $button-classes == true { |
| 184 | + @if $button-classes { |
179 | 185 | @include button-classes(); |
180 | 186 | } |
181 | 187 |
|
182 | 188 | // Form control classes |
183 | | - @if $form-controls-classes == true { |
| 189 | + @if $form-controls-classes { |
184 | 190 | @include form-controls-classes(); |
185 | 191 | } |
186 | 192 |
|
187 | 193 | // Typography classes |
188 | | - @if $typography-classes == true { |
| 194 | + @if $typography-classes { |
189 | 195 | @include typography-classes(); |
190 | 196 | } |
191 | 197 | } |
192 | 198 |
|
193 | 199 | // - - - - - - - - - - - - - - - - - - - - |
194 | 200 | // Components |
195 | 201 | // - - - - - - - - - - - - - - - - - - - - |
196 | | - @if $components == true { |
| 202 | + @if $components { |
197 | 203 | // card |
198 | | - @if $card == true { |
| 204 | + @if $card { |
199 | 205 | @include card(); |
200 | 206 | } |
201 | 207 |
|
202 | 208 | // header |
203 | | - @if $header == true { |
| 209 | + @if $header { |
204 | 210 | @include header(); |
205 | 211 | } |
206 | 212 |
|
207 | 213 | // markdown |
208 | | - @if $markdown == true { |
| 214 | + @if $markdown { |
209 | 215 | @include markdown(); |
210 | 216 | } |
211 | 217 |
|
212 | 218 | // tab |
213 | | - @if $tab == true { |
| 219 | + @if $tab { |
214 | 220 | @include tab(); |
215 | 221 | } |
216 | 222 |
|
217 | 223 | // tree-view |
218 | | - @if $tree-view == true { |
| 224 | + @if $tree-view { |
219 | 225 | @include tree-view(); |
220 | 226 | } |
221 | 227 |
|
222 | 228 | // tree-view-navigation |
223 | | - @if $tree-view-navigation == true { |
| 229 | + @if $tree-view-navigation { |
224 | 230 | @include tree-view-navigation(); |
225 | 231 | } |
226 | 232 | } |
|
0 commit comments