Skip to content

Commit c18a990

Browse files
committed
update
1 parent 79bd79e commit c18a990

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

.changeset/slow-cows-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@microsoft/atlas-css': minor
3+
---
4+
5+
Todo: reason through whether this is a breaking change. Possibly add overrides for the faux containers on widescreen or consider a different widescreen approach.

css/src/components/layout.scss

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@use 'sass:math';
22

3+
$twelveth-widescreen: math.div($breakpoint-widescreen, 12);
4+
$sixth-widescreen: math.div($breakpoint-widescreen, 6);
35
$quarter-widescreen: math.div($breakpoint-widescreen, 4);
46
$half-widescreen: math.div($breakpoint-widescreen, 2);
57
$three-quarters-widescreen: math.div($breakpoint-widescreen, 4) * 3;
@@ -54,6 +56,11 @@ $default-flyout-width-widescreen: 480px;
5456
display: grid;
5557
width: 100%;
5658
max-width: 100%;
59+
60+
// use a min function to get the smallest of the text-wrap-mode:
61+
// either 1/12 of the viewport width or 1/12 of $breakpoint-widescreen;
62+
//assign to variable $column-gap
63+
// use css min function not math.min;
5764
}
5865

5966
// grid-area values
@@ -136,6 +143,7 @@ $default-flyout-width-widescreen: 480px;
136143
}
137144

138145
@include desktop {
146+
column-gap: math.div(100vw, 12); // addition
139147
grid-template:
140148
minmax(auto, max-content) auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(
141149
0,
@@ -150,17 +158,21 @@ $default-flyout-width-widescreen: 480px;
150158
}
151159

152160
@include widescreen {
153-
grid-template: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$quarter-widescreen} #{$half-widescreen} #{$quarter-widescreen} auto;
161+
column-gap: 0; // reset the column gap set on desktop // addition
162+
grid-template:
163+
minmax(auto, max-content) auto var(--atlas-contained-height)
164+
auto / auto #{$sixth-widescreen} #{$twelveth-widescreen} #{$half-widescreen} #{$twelveth-widescreen} #{$sixth-widescreen} auto; // addition
154165
grid-template-areas:
155-
'header header header header header'
156-
'hero hero hero hero hero'
157-
'. menu main aside .'
158-
'footer footer footer footer footer';
166+
'header header header header header header header'
167+
'hero hero hero hero hero hero hero'
168+
'. menu . main . aside .'
169+
'footer footer footer footer footer footer footer';
159170
}
160171
}
161172

162173
&.layout-flyout-active .layout-body {
163174
@include desktop {
175+
column-gap: 36px; // addition
164176
grid-template:
165177
auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)
166178
var(#{$layout-flyout-width-name});
@@ -172,6 +184,7 @@ $default-flyout-width-widescreen: 480px;
172184
}
173185

174186
@include widescreen {
187+
column-gap: 48px; // addition
175188
grid-template:
176189
auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)
177190
var(#{$layout-flyout-width-name});
@@ -216,7 +229,9 @@ $default-flyout-width-widescreen: 480px;
216229
}
217230

218231
@include widescreen {
219-
grid-template: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$quarter-widescreen} #{$three-quarters-widescreen} auto;
232+
grid-template:
233+
minmax(auto, max-content) auto var(--atlas-contained-height)
234+
auto / auto #{$quarter-widescreen} #{$three-quarters-widescreen} auto;
220235
grid-template-areas:
221236
'header header header header'
222237
'hero hero hero hero'
@@ -288,7 +303,9 @@ $default-flyout-width-widescreen: 480px;
288303
}
289304

290305
@include widescreen {
291-
grid-template: minmax(auto, max-content) auto var(--atlas-contained-height) auto / auto #{$three-quarters-widescreen} #{$quarter-widescreen} auto;
306+
grid-template:
307+
minmax(auto, max-content) auto var(--atlas-contained-height)
308+
auto / auto #{$three-quarters-widescreen} #{$quarter-widescreen} auto;
292309
grid-template-areas:
293310
'header header header header'
294311
'hero hero hero hero'

0 commit comments

Comments
 (0)