Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move flyout to be under the header #694

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/green-lobsters-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@microsoft/atlas-css': patch
---

Flyout to render under the header and footer not adjacent to them.
30 changes: 15 additions & 15 deletions css/src/components/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $default-flyout-width-widescreen: 480px;
&.layout-flyout-active .layout-body {
@include desktop {
grid-template: auto auto auto 1fr auto auto / minmax(0, 1fr) var(#{$layout-flyout-width-name});
grid-template-areas: 'header flyout' 'hero flyout' 'menu flyout' 'main flyout' 'aside flyout' 'footer flyout';
grid-template-areas: 'header header' 'hero flyout' 'menu flyout' 'main flyout' 'aside flyout' 'footer footer';
}
}
}
Expand Down Expand Up @@ -152,21 +152,21 @@ $default-flyout-width-widescreen: 480px;
auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)
var(#{$layout-flyout-width-name});
grid-template-areas:
'header header header flyout'
'header header header header'
'hero hero hero flyout'
'menu main aside flyout'
'footer footer footer flyout';
'footer footer footer footer';
}

@include widescreen {
grid-template:
auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr)
var(#{$layout-flyout-width-name});
grid-template-areas:
'header header header flyout'
'header header header header'
'hero hero hero flyout'
'menu main aside flyout'
'footer footer footer flyout';
'footer footer footer footer';
}
}
}
Expand Down Expand Up @@ -214,20 +214,20 @@ $default-flyout-width-widescreen: 480px;
#{$layout-flyout-width-name}
);
grid-template-areas:
'header header flyout'
'header header header'
'hero hero flyout'
'menu main flyout'
'footer footer flyout';
'footer footer footer';
}
@include widescreen {
grid-template: auto auto var(--atlas-contained-height) auto / minmax(0, 1fr) minmax(0, 3fr) var(
#{$layout-flyout-width-name}
);
grid-template-areas:
'header header flyout'
'header header header'
'hero hero flyout'
'menu main flyout'
'footer footer flyout';
'footer footer footer';
}
}
}
Expand Down Expand Up @@ -275,21 +275,21 @@ $default-flyout-width-widescreen: 480px;
#{$layout-flyout-width-name}
);
grid-template-areas:
'header header flyout'
'header header header'
'hero hero flyout'
'main aside flyout'
'footer footer flyout';
'footer footer footer';
}

@include widescreen {
grid-template: auto auto var(--atlas-contained-height) auto / minmax(0, 3fr) minmax(0, 1fr) var(
#{$layout-flyout-width-name}
);
grid-template-areas:
'header header flyout'
'header header header'
'hero hero flyout'
'main aside flyout'
'footer footer flyout';
'footer footer footer';
}
}
}
Expand Down Expand Up @@ -320,10 +320,10 @@ $default-flyout-width-widescreen: 480px;
#{$layout-flyout-width-name}
);
grid-template-areas:
'header header flyout'
'header header header'
'hero hero flyout'
'main aside flyout'
'footer footer flyout';
'footer footer footer';
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions css/src/tokens/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ $reading-max-width: 50rem !default;

$layout-gap: 24px !default;
$layout-widescreen-width: $breakpoint-widescreen - $layout-gap * 2 !default;
$layout-widescreen-gap: calc(
50% - #{$layout-widescreen-width} / 2
$layout-widescreen-gap: max(
$layout-gap,
calc(50% - #{$layout-widescreen-width} / 2)
) !default; // $layout-widescreen-gap is a naming error, keeping for backwards compat

$layout-gap-custom-property-name: '--layout-gap' !default;
Expand Down
Loading