Skip to content

Commit 22c29e7

Browse files
vdepizzoljonrohan
andauthored
[Layout component] Avoid resizing main while loading (#1818)
* avoid resizing `main` while loading * Update layout.scss * Create stale-pugs-eat.md Co-authored-by: Jon Rohan <[email protected]>
1 parent 929ba56 commit 22c29e7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/stale-pugs-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": patch
3+
---
4+
5+
[Layout component] Avoid resizing `main` while loading

src/layout/layout.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Flow as column
2626

2727
grid-auto-flow: column;
28-
grid-template-columns: auto 0 1fr; // sidebar column, separator, main column
28+
grid-template-columns: auto 0 minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))); // sidebar column, separator, main column
2929
grid-gap: var(--Layout-gutter);
3030

3131
.Layout-sidebar {
@@ -101,7 +101,7 @@
101101
}
102102

103103
&.Layout--sidebarPosition-end {
104-
grid-template-columns: 1fr 0 auto;
104+
grid-template-columns: minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto;
105105

106106
.Layout-main {
107107
grid-column: 1;

0 commit comments

Comments
 (0)