@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.
@@ -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 no-descending-specificity */
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 / minmax(0, 1fr)
132
- minmax(0, 2fr);
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
- 2fr
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-flyout-active .layout-body {
166
- @include desktop {
170
+ &.layout-menu-collapsed .layout-body {
171
+ @include tablet {
167
172
  grid-template:
168
- auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)
169
- var(#{$layout-flyout-width-name});
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 header header'
172
- 'hero hero hero flyout'
173
- 'menu main aside flyout'
174
- 'footer footer footer footer';
178
+ 'header header'
179
+ 'hero hero'
180
+ 'menu main'
181
+ 'menu aside'
182
+ 'footer footer';
175
183
  }
176
184
 
177
- @include widescreen {
185
+ @include desktop {
178
186
  grid-template:
179
- auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)
180
- var(#{$layout-flyout-width-name});
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 flyout'
184
- 'menu main aside flyout'
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
- &.layout-holy-grail .layout-body {
212
- @include tablet {
199
+ @include widescreen {
213
200
  grid-template:
214
- minmax(auto, max-content) auto var(--atlas-contained-height) auto auto / minmax(0, 1fr)
215
- minmax(0, 7fr) minmax(0, 1fr);
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
- '. aside .'
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
- minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 7fr)
227
- minmax(0, 23fr) minmax(0, 10fr);
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: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$eighth-widescreen} #{$five-eighths-widescreen} #{$quarter-widescreen} auto;
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 header'
239
- 'hero hero hero hero hero'
240
- '. menu main aside .'
241
- 'footer 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
- // sidecar-left layout with collapsed menu - centers main content
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
- minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr)
251
- minmax(0, 7fr) minmax(0, 1fr);
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
- '. main .'
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: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$three-quarters-widescreen} auto;
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
- '. main .'
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, 2fr);
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, 3fr);
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
- 3fr
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
- 3fr
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, 2fr)
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, 3fr)
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, 3fr) minmax(
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, 3fr) minmax(
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 */
@@ -18,7 +18,7 @@ $list-top-spacing: 1rem !default;
18
18
  .markdown {
19
19
  // @include responsive-font-size($markdown-paragraph-size, 0.875rem); // experiment only
20
20
  font-size: $markdown-paragraph-size;
21
- line-height: 1.6;
21
+ line-height: 1.75;
22
22
 
23
23
  // Inline code
24
24
 
@@ -0,0 +1,3 @@
1
+ .reading-width {
2
+ max-width: $optimal-reading-width;
3
+ }
@@ -7,5 +7,5 @@ $container-gap: 64px !default;
7
7
  // Breakpoints
8
8
  $breakpoint-tablet: 768px !default;
9
9
  $breakpoint-desktop: 1088px !default;
10
- $breakpoint-widescreen: 1800px !default;
10
+ $breakpoint-widescreen: 2800px !default;
11
11
  //@end-sass-export-section
@@ -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
@@ -28,6 +28,9 @@ $letter-spacing-medium: 0.125rem;
28
28
  $letter-spacing-wide: 0.225rem;
29
29
 
30
30
  // Line height
31
- $line-height-normal: 1.3;
31
+ $line-height-normal: 1.4;
32
+
33
+ // Reading width
34
+ $optimal-reading-width: 688px;
32
35
 
33
36
  //@end-sass-export-section