@microsoft/atlas-css 4.3.0 → 5.0.0-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/class-names.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens.json +1 -1
- package/dist/tokens.ts +17 -11
- package/package.json +4 -4
- package/src/components/index.scss +1 -0
- package/src/components/layout.scss +150 -85
- package/src/components/markdown.scss +1 -1
- package/src/components/reading-width.scss +3 -0
- package/src/tokens/breakpoints.scss +1 -1
- package/src/tokens/layout.scss +2 -1
- package/src/tokens/typography.scss +4 -1
|
@@ -8,6 +8,7 @@ $default-flyout-width-widescreen: 480px;
|
|
|
8
8
|
$default-aside-min-width: 300px;
|
|
9
9
|
$eighth-widescreen: math.div($breakpoint-widescreen, 8); // 225px
|
|
10
10
|
$five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
11
|
+
$layout-menu-collapsed-width: 96px !default;
|
|
11
12
|
|
|
12
13
|
:root {
|
|
13
14
|
--window-inner-height: 100vh; // to be overwritten by JS
|
|
@@ -27,6 +28,10 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
27
28
|
#{$layout-flyout-width-desktop-custom-property-name}: $default-flyout-width-desktop;
|
|
28
29
|
#{$layout-flyout-width-widescreen-custom-property-name}: $default-flyout-width-widescreen;
|
|
29
30
|
#{$layout-flyout-width-name}: var(#{$layout-flyout-width-desktop-custom-property-name});
|
|
31
|
+
#{$layout-menu-collapsed-width-name}: $layout-menu-collapsed-width;
|
|
32
|
+
#{$layout-menu-collapsed-width-widescreen-spacer-width-name}: calc(
|
|
33
|
+
$quarter-widescreen - var(#{$layout-menu-collapsed-width-name})
|
|
34
|
+
);
|
|
30
35
|
|
|
31
36
|
@include widescreen {
|
|
32
37
|
#{$layout-gap-scalable-custom-property-name}: $layout-widescreen-gap;
|
|
@@ -102,7 +107,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
102
107
|
|
|
103
108
|
/* It is quite hard to keep the layout rules organized / group while satisfying the no-descrending specificity lint rule. Disabling it here. */
|
|
104
109
|
|
|
105
|
-
/* stylelint-disable
|
|
110
|
+
/* stylelint-disable */
|
|
106
111
|
|
|
107
112
|
.layout,
|
|
108
113
|
.layout.layout-single {
|
|
@@ -128,8 +133,8 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
128
133
|
|
|
129
134
|
@include tablet {
|
|
130
135
|
grid-template:
|
|
131
|
-
minmax(auto, max-content) auto var(--atlas-contained-height) auto auto /
|
|
132
|
-
minmax(0,
|
|
136
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto auto /
|
|
137
|
+
minmax(0, 1fr) minmax(0, 5fr);
|
|
133
138
|
grid-template-areas:
|
|
134
139
|
'header header'
|
|
135
140
|
'hero hero'
|
|
@@ -142,7 +147,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
142
147
|
grid-template:
|
|
143
148
|
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(
|
|
144
149
|
0,
|
|
145
|
-
|
|
150
|
+
4fr
|
|
146
151
|
)
|
|
147
152
|
minmax(0, 1fr);
|
|
148
153
|
grid-template-areas:
|
|
@@ -162,107 +167,97 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
|
|
165
|
-
&.layout-
|
|
166
|
-
@include
|
|
170
|
+
&.layout-menu-collapsed .layout-body {
|
|
171
|
+
@include tablet {
|
|
167
172
|
grid-template:
|
|
168
|
-
auto auto var(--atlas-contained-height) auto /
|
|
169
|
-
|
|
173
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto auto / var(
|
|
174
|
+
#{$layout-menu-collapsed-width-name}
|
|
175
|
+
)
|
|
176
|
+
minmax(0, 1fr);
|
|
170
177
|
grid-template-areas:
|
|
171
|
-
'header header
|
|
172
|
-
'hero hero
|
|
173
|
-
'menu main
|
|
174
|
-
'
|
|
178
|
+
'header header'
|
|
179
|
+
'hero hero'
|
|
180
|
+
'menu main'
|
|
181
|
+
'menu aside'
|
|
182
|
+
'footer footer';
|
|
175
183
|
}
|
|
176
184
|
|
|
177
|
-
@include
|
|
185
|
+
@include desktop {
|
|
178
186
|
grid-template:
|
|
179
|
-
auto auto var(--atlas-contained-height) auto /
|
|
180
|
-
|
|
187
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / var(
|
|
188
|
+
#{$layout-menu-collapsed-width-name}
|
|
189
|
+
)
|
|
190
|
+
minmax(0, 4fr)
|
|
191
|
+
minmax(0, 23fr) minmax(0, 10fr);
|
|
181
192
|
grid-template-areas:
|
|
182
193
|
'header header header header'
|
|
183
|
-
'hero hero hero
|
|
184
|
-
'menu main aside
|
|
194
|
+
'hero hero hero hero'
|
|
195
|
+
'menu . main aside'
|
|
185
196
|
'footer footer footer footer';
|
|
186
197
|
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// layout-menu-collapsed is a modifier that works with layouts that have a menu
|
|
191
|
-
// It hides the menu and adjusts the main/aside areas accordingly
|
|
192
|
-
|
|
193
|
-
.layout.layout-menu-collapsed {
|
|
194
|
-
// Styles for main and aside when menu is collapsed (only for holy-grail)
|
|
195
|
-
|
|
196
|
-
&.layout-holy-grail {
|
|
197
|
-
.layout-body-main {
|
|
198
|
-
width: 100%;
|
|
199
|
-
max-width: $half-widescreen !important;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.layout-body-aside {
|
|
203
|
-
flex-shrink: 0 !important;
|
|
204
|
-
width: 100% !important;
|
|
205
|
-
min-width: $default-aside-min-width !important;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// holy-grail layout with collapsed menu needs different grid proportions
|
|
210
198
|
|
|
211
|
-
|
|
212
|
-
@include tablet {
|
|
199
|
+
@include widescreen {
|
|
213
200
|
grid-template:
|
|
214
|
-
minmax(auto, max-content) auto var(--atlas-contained-height) auto
|
|
215
|
-
|
|
201
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, auto) var(
|
|
202
|
+
#{$layout-menu-collapsed-width-name}
|
|
203
|
+
)
|
|
204
|
+
minmax(0, var(#{$layout-menu-collapsed-width-widescreen-spacer-width-name}))
|
|
205
|
+
$half-widescreen minmax(0, #{$quarter-widescreen}) minmax(0, auto);
|
|
216
206
|
grid-template-areas:
|
|
217
|
-
'header header header'
|
|
218
|
-
'hero hero hero'
|
|
219
|
-
'. main .'
|
|
220
|
-
'
|
|
221
|
-
'footer footer footer';
|
|
207
|
+
'header header header header header header'
|
|
208
|
+
'hero hero hero hero hero hero'
|
|
209
|
+
'. menu . main aside .'
|
|
210
|
+
'footer footer footer footer footer footer';
|
|
222
211
|
}
|
|
212
|
+
}
|
|
223
213
|
|
|
214
|
+
&.layout-flyout-active .layout-body {
|
|
224
215
|
@include desktop {
|
|
225
216
|
grid-template:
|
|
226
|
-
|
|
227
|
-
|
|
217
|
+
auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 4fr) minmax(0, 1fr)
|
|
218
|
+
var(#{$layout-flyout-width-name});
|
|
228
219
|
grid-template-areas:
|
|
229
|
-
'header header header'
|
|
230
|
-
'hero hero hero'
|
|
231
|
-
'menu main aside'
|
|
232
|
-
'footer footer footer';
|
|
220
|
+
'header header header header'
|
|
221
|
+
'hero hero hero flyout'
|
|
222
|
+
'menu main aside flyout'
|
|
223
|
+
'footer footer footer footer';
|
|
233
224
|
}
|
|
234
225
|
|
|
235
226
|
@include widescreen {
|
|
236
|
-
grid-template:
|
|
227
|
+
grid-template:
|
|
228
|
+
auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 4fr) minmax(0, 1fr)
|
|
229
|
+
var(#{$layout-flyout-width-name});
|
|
237
230
|
grid-template-areas:
|
|
238
|
-
'header header header header
|
|
239
|
-
'hero hero hero
|
|
240
|
-
'
|
|
241
|
-
'footer footer footer footer
|
|
231
|
+
'header header header header'
|
|
232
|
+
'hero hero hero flyout'
|
|
233
|
+
'menu main aside flyout'
|
|
234
|
+
'footer footer footer footer';
|
|
242
235
|
}
|
|
243
236
|
}
|
|
244
237
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
&.layout-sidecar-left .layout-body {
|
|
248
|
-
@include tablet {
|
|
238
|
+
&.layout-flyout-active.layout-menu-collapsed .layout-body {
|
|
239
|
+
@include desktop {
|
|
249
240
|
grid-template:
|
|
250
|
-
|
|
251
|
-
minmax(0,
|
|
241
|
+
auto auto var(--atlas-contained-height) auto / var(#{$layout-menu-collapsed-width-name})
|
|
242
|
+
minmax(0, 4) minmax(0, 1fr)
|
|
243
|
+
var(#{$layout-flyout-width-name});
|
|
252
244
|
grid-template-areas:
|
|
253
|
-
'header header header'
|
|
254
|
-
'hero hero hero'
|
|
255
|
-
'
|
|
256
|
-
'footer footer footer';
|
|
245
|
+
'header header header header'
|
|
246
|
+
'hero hero hero flyout'
|
|
247
|
+
'menu main aside flyout'
|
|
248
|
+
'footer footer footer footer';
|
|
257
249
|
}
|
|
258
250
|
|
|
259
251
|
@include widescreen {
|
|
260
|
-
grid-template:
|
|
252
|
+
grid-template:
|
|
253
|
+
auto auto var(--atlas-contained-height) auto / var(#{$layout-menu-collapsed-width-name})
|
|
254
|
+
minmax(0, 4) minmax(0, 1fr)
|
|
255
|
+
var(#{$layout-flyout-width-name});
|
|
261
256
|
grid-template-areas:
|
|
262
|
-
'header header header'
|
|
263
|
-
'hero hero hero'
|
|
264
|
-
'
|
|
265
|
-
'footer footer footer';
|
|
257
|
+
'header header header header'
|
|
258
|
+
'hero hero hero flyout'
|
|
259
|
+
'menu main aside flyout'
|
|
260
|
+
'footer footer footer footer';
|
|
266
261
|
}
|
|
267
262
|
}
|
|
268
263
|
}
|
|
@@ -279,7 +274,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
279
274
|
@include tablet {
|
|
280
275
|
grid-template:
|
|
281
276
|
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr)
|
|
282
|
-
minmax(0,
|
|
277
|
+
minmax(0, 4fr);
|
|
283
278
|
grid-template-areas:
|
|
284
279
|
'header header'
|
|
285
280
|
'hero hero'
|
|
@@ -290,7 +285,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
290
285
|
@include desktop {
|
|
291
286
|
grid-template:
|
|
292
287
|
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr)
|
|
293
|
-
minmax(0,
|
|
288
|
+
minmax(0, 5fr);
|
|
294
289
|
grid-template-areas:
|
|
295
290
|
'header header'
|
|
296
291
|
'hero hero'
|
|
@@ -308,12 +303,55 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
308
303
|
}
|
|
309
304
|
}
|
|
310
305
|
|
|
306
|
+
&.layout-menu-collapsed .layout-body {
|
|
307
|
+
@include tablet {
|
|
308
|
+
grid-template:
|
|
309
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / var(
|
|
310
|
+
#{$layout-menu-collapsed-width-name}
|
|
311
|
+
)
|
|
312
|
+
minmax(0, 1fr);
|
|
313
|
+
grid-template-areas:
|
|
314
|
+
'header header'
|
|
315
|
+
'hero hero'
|
|
316
|
+
'menu main'
|
|
317
|
+
'footer footer';
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@include desktop {
|
|
321
|
+
grid-template:
|
|
322
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / var(
|
|
323
|
+
#{$layout-menu-collapsed-width-name}
|
|
324
|
+
)
|
|
325
|
+
minmax(0, 1)
|
|
326
|
+
minmax(0, 10fr) minmax(0, 2fr);
|
|
327
|
+
grid-template-areas:
|
|
328
|
+
'header header header header'
|
|
329
|
+
'hero hero hero hero'
|
|
330
|
+
'menu . main main'
|
|
331
|
+
'footer footer footer footer';
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@include widescreen {
|
|
335
|
+
grid-template:
|
|
336
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, auto) var(
|
|
337
|
+
#{$layout-menu-collapsed-width-name}
|
|
338
|
+
)
|
|
339
|
+
minmax(0, var(#{$layout-menu-collapsed-width-widescreen-spacer-width-name}))
|
|
340
|
+
#{$three-quarters-widescreen} minmax(0, auto);
|
|
341
|
+
grid-template-areas:
|
|
342
|
+
'header header header header header'
|
|
343
|
+
'hero hero hero hero hero'
|
|
344
|
+
'. menu . main .'
|
|
345
|
+
'footer footer footer footer footer';
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
311
349
|
&.layout-flyout-active .layout-body {
|
|
312
350
|
@include desktop {
|
|
313
351
|
grid-template:
|
|
314
352
|
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(
|
|
315
353
|
0,
|
|
316
|
-
|
|
354
|
+
4fr
|
|
317
355
|
)
|
|
318
356
|
var(#{$layout-flyout-width-name});
|
|
319
357
|
grid-template-areas:
|
|
@@ -327,7 +365,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
327
365
|
grid-template:
|
|
328
366
|
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(
|
|
329
367
|
0,
|
|
330
|
-
|
|
368
|
+
4fr
|
|
331
369
|
)
|
|
332
370
|
var(#{$layout-flyout-width-name});
|
|
333
371
|
grid-template-areas:
|
|
@@ -337,6 +375,33 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
337
375
|
'footer footer footer';
|
|
338
376
|
}
|
|
339
377
|
}
|
|
378
|
+
|
|
379
|
+
&.layout-flyout-active.layout-menu-collapsed .layout-body {
|
|
380
|
+
@include desktop {
|
|
381
|
+
grid-template:
|
|
382
|
+
auto auto var(--atlas-contained-height) auto / var(#{$layout-menu-collapsed-width-name})
|
|
383
|
+
minmax(0, 1fr)
|
|
384
|
+
var(#{$layout-flyout-width-name});
|
|
385
|
+
grid-template-areas:
|
|
386
|
+
'header header header'
|
|
387
|
+
'hero hero flyout'
|
|
388
|
+
'menu main flyout'
|
|
389
|
+
'footer footer footer';
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
@include widescreen {
|
|
393
|
+
grid-template:
|
|
394
|
+
auto auto var(--atlas-contained-height) auto / var(#{$layout-menu-collapsed-width-name})
|
|
395
|
+
minmax(0, var(#{$layout-menu-collapsed-width-widescreen-spacer-width-name}))
|
|
396
|
+
minmax(0, 1fr)
|
|
397
|
+
var(#{$layout-flyout-width-name});
|
|
398
|
+
grid-template-areas:
|
|
399
|
+
'header header header header'
|
|
400
|
+
'hero hero hero flyout'
|
|
401
|
+
'menu . main flyout'
|
|
402
|
+
'footer footer footer footer';
|
|
403
|
+
}
|
|
404
|
+
}
|
|
340
405
|
}
|
|
341
406
|
|
|
342
407
|
.layout.layout-sidecar-right {
|
|
@@ -350,7 +415,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
350
415
|
|
|
351
416
|
@include tablet {
|
|
352
417
|
grid-template:
|
|
353
|
-
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0,
|
|
418
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 5fr)
|
|
354
419
|
minmax(0, 1fr);
|
|
355
420
|
grid-template-areas:
|
|
356
421
|
'header header'
|
|
@@ -361,7 +426,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
361
426
|
|
|
362
427
|
@include desktop {
|
|
363
428
|
grid-template:
|
|
364
|
-
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0,
|
|
429
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 5fr)
|
|
365
430
|
minmax(0, 1fr);
|
|
366
431
|
grid-template-areas:
|
|
367
432
|
'header header'
|
|
@@ -383,7 +448,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
383
448
|
&.layout-flyout-active .layout-body {
|
|
384
449
|
@include desktop {
|
|
385
450
|
grid-template:
|
|
386
|
-
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0,
|
|
451
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 4fr) minmax(
|
|
387
452
|
0,
|
|
388
453
|
1fr
|
|
389
454
|
)
|
|
@@ -397,7 +462,7 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
397
462
|
|
|
398
463
|
@include widescreen {
|
|
399
464
|
grid-template:
|
|
400
|
-
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0,
|
|
465
|
+
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 4fr) minmax(
|
|
401
466
|
0,
|
|
402
467
|
1fr
|
|
403
468
|
)
|
|
@@ -450,8 +515,6 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
450
515
|
}
|
|
451
516
|
}
|
|
452
517
|
|
|
453
|
-
/* stylelint-enable no-descending-specificity */
|
|
454
|
-
|
|
455
518
|
@mixin constrained-layout-child {
|
|
456
519
|
position: sticky;
|
|
457
520
|
inset-block-start: 0;
|
|
@@ -516,3 +579,5 @@ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
|
|
|
516
579
|
}
|
|
517
580
|
}
|
|
518
581
|
}
|
|
582
|
+
|
|
583
|
+
/* stylelint-enable */
|
package/src/tokens/layout.scss
CHANGED
|
@@ -19,5 +19,6 @@ $layout-gap-scalable-custom-property-name: '--layout-gap-scalable' !default;
|
|
|
19
19
|
$layout-flyout-width-name: '--layout-flyout-width' !default;
|
|
20
20
|
$layout-flyout-width-desktop-custom-property-name: '--layout-flyout-width-desktop' !default;
|
|
21
21
|
$layout-flyout-width-widescreen-custom-property-name: '--layout-flyout-width-widescreen' !default;
|
|
22
|
-
|
|
22
|
+
$layout-menu-collapsed-width-name: '--layout-menu-collapsed-width' !default;
|
|
23
|
+
$layout-menu-collapsed-width-widescreen-spacer-width-name: '--layout-menu-collapsed-width-widescreen' !default;
|
|
23
24
|
//@end-sass-export-section
|