Skip to content

Commit

Permalink
Prevent content to increase main's size (#1486)
Browse files Browse the repository at this point in the history
Based on https://css-tricks.com/preventing-a-grid-blowout/

If main's content was large enough, it would cause `main` to grow more than it should and push `sidebar` to the side, causing an horizontal scroll on pages.

| Before | After |
|--------|--------|
| ![image](https://user-images.githubusercontent.com/11280312/124145356-56996900-da52-11eb-954d-8b6a44d85cea.png) | ![image](https://user-images.githubusercontent.com/11280312/124145395-5e590d80-da52-11eb-9024-175c2de360ad.png) |
  • Loading branch information
manuelpuyol authored Jul 2, 2021
1 parent b4ef503 commit f52d40c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-ways-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/css': patch
---

Prevents main content to blowout and cause an horizontal scroll
1 change: 1 addition & 0 deletions src/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
}

.Layout-main {
min-width: 0;

// Centered main column
// FIXME: right-aligned sidebar
Expand Down

0 comments on commit f52d40c

Please sign in to comment.