Skip to content

Commit

Permalink
[Layout component] Avoid resizing main while loading (#1818)
Browse files Browse the repository at this point in the history
* avoid resizing `main` while loading

* Update layout.scss

* Create stale-pugs-eat.md

Co-authored-by: Jon Rohan <yes@jonrohan.codes>
  • Loading branch information
vdepizzol and jonrohan committed Dec 9, 2021
1 parent 929ba56 commit 22c29e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-pugs-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

[Layout component] Avoid resizing `main` while loading
4 changes: 2 additions & 2 deletions src/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// Flow as column

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

.Layout-sidebar {
Expand Down Expand Up @@ -101,7 +101,7 @@
}

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

.Layout-main {
grid-column: 1;
Expand Down

0 comments on commit 22c29e7

Please sign in to comment.