-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update Layout
's sidebar width values
#1738
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
Conversation
🦋 Changeset detectedLatest commit: e05a6a0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
) !default; | ||
|
||
$sidebar-narrow-width: ( | ||
md: 240px, | ||
lg: 256px, | ||
xl: 296px | ||
lg: 256px |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sharing the output from testing for clarity:
@media (min-width: 768px) {
.Layout.Layout--sidebar-narrow {
--Layout-sidebar-width: 240px;
}
}
@media (min-width: 1012px) {
.Layout.Layout--sidebar-narrow {
--Layout-sidebar-width: 256px;
}
}
@@ -169,14 +169,12 @@ $responsive-positions: ( | |||
$sidebar-width: ( | |||
sm: 220px, | |||
md: 256px, | |||
lg: 296px, | |||
xl: 320px | |||
lg: 296px |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output:
@media (min-width: 544px) {
.Layout {
--Layout-sidebar-width: 220px;
}
}
@media (min-width: 768px) {
.Layout {
--Layout-sidebar-width: 256px;
}
}
@media (min-width: 1012px) {
.Layout {
--Layout-sidebar-width: 296px;
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍🏻
This update addresses some previous feedback on the
Layout
component's sidebar widths.With the new values, the default sidebar width is more compact by default, being closer to its previous value. Originally a
col-3
on axl
would render as ~280px. With theLayout
component introduction it incorrectly increased to320px
. This PR dials it back to 296px.On a desktop computer (
xl
breakpoint), these are the new options:sidebarWidth
default
narrow
wide
✌️
/cc @primer/css-reviewers @camertron @jonrohan