Skip to content

Commit f52d40c

Browse files
authored
Prevent content to increase main's size (#1486)
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) |
1 parent b4ef503 commit f52d40c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/happy-ways-suffer.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/css': patch
3+
---
4+
5+
Prevents main content to blowout and cause an horizontal scroll

src/layout/layout.scss

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
}
153153

154154
.Layout-main {
155+
min-width: 0;
155156

156157
// Centered main column
157158
// FIXME: right-aligned sidebar

0 commit comments

Comments
 (0)