@microsoft/atlas-css 4.2.0 → 4.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/atlas-css",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "Styles backing the Atlas Design System used by Microsoft's Developer Relations.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -5,6 +5,9 @@ $half-widescreen: math.div($breakpoint-widescreen, 2);
5
5
  $three-quarters-widescreen: math.div($breakpoint-widescreen, 4) * 3;
6
6
  $default-flyout-width-desktop: 320px;
7
7
  $default-flyout-width-widescreen: 480px;
8
+ $default-aside-min-width: 300px;
9
+ $eighth-widescreen: math.div($breakpoint-widescreen, 8); // 225px
10
+ $five-eighths-widescreen: math.div($breakpoint-widescreen, 8) * 5; // 1125px
8
11
 
9
12
  :root {
10
13
  --window-inner-height: 100vh; // to be overwritten by JS
@@ -184,6 +187,86 @@ $default-flyout-width-widescreen: 480px;
184
187
  }
185
188
  }
186
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
+
211
+ &.layout-holy-grail .layout-body {
212
+ @include tablet {
213
+ grid-template:
214
+ minmax(auto, max-content) auto var(--atlas-contained-height) auto auto / minmax(0, 1fr)
215
+ minmax(0, 7fr) minmax(0, 1fr);
216
+ grid-template-areas:
217
+ 'header header header'
218
+ 'hero hero hero'
219
+ '. main .'
220
+ '. aside .'
221
+ 'footer footer footer';
222
+ }
223
+
224
+ @include desktop {
225
+ grid-template:
226
+ minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 7fr)
227
+ minmax(0, 23fr) minmax(0, 10fr);
228
+ grid-template-areas:
229
+ 'header header header'
230
+ 'hero hero hero'
231
+ 'menu main aside'
232
+ 'footer footer footer';
233
+ }
234
+
235
+ @include widescreen {
236
+ grid-template: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$eighth-widescreen} #{$five-eighths-widescreen} #{$quarter-widescreen} auto;
237
+ 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';
242
+ }
243
+ }
244
+
245
+ // sidecar-left layout with collapsed menu - centers main content
246
+
247
+ &.layout-sidecar-left .layout-body {
248
+ @include tablet {
249
+ grid-template:
250
+ minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr)
251
+ minmax(0, 7fr) minmax(0, 1fr);
252
+ grid-template-areas:
253
+ 'header header header'
254
+ 'hero hero hero'
255
+ '. main .'
256
+ 'footer footer footer';
257
+ }
258
+
259
+ @include widescreen {
260
+ grid-template: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$three-quarters-widescreen} auto;
261
+ grid-template-areas:
262
+ 'header header header'
263
+ 'hero hero hero'
264
+ '. main .'
265
+ 'footer footer footer';
266
+ }
267
+ }
268
+ }
269
+
187
270
  .layout.layout-sidecar-left {
188
271
  .layout-body-aside {
189
272
  display: none;