-
Notifications
You must be signed in to change notification settings - Fork 341
ENH: manage sidebars on small screens #726
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
Changes from all commits
7e286ff
aa1b564
fdb0e44
38b37a8
19546f2
a4b1828
2a4d0cd
e835a9f
b74cd04
35eaf63
e07a165
5f6c6d2
c687c64
a367772
d3f245d
75ba580
4cff4b0
b91ba97
9cf8076
09a919a
bdab3b6
594891b
cdf1960
a092734
abf8ddc
981095b
cd9dba4
ea9c59f
d745f4c
882b3ed
1e85c84
221705c
3220cab
3690f39
7b49fc2
0f38ec8
cd5a789
cd165d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.bd-header-article__inner { | ||
min-height: var(--pst-header-article-height); | ||
display: flex; | ||
align-items: center; | ||
padding: 0 0.5rem; | ||
|
||
.bd-header-article__end { | ||
margin-left: auto; | ||
} | ||
|
||
// We hide this at the secondary breakpoint because no buttons are present here | ||
@include media-breakpoint-up($breakpoint-sidebar-secondary) { | ||
display: none; | ||
} | ||
} | ||
|
||
// Toggle labels | ||
label { | ||
&.sidebar-toggle { | ||
display: flex; | ||
cursor: pointer; | ||
font-size: 1.2rem; | ||
align-items: center; | ||
color: var(--pst-color-muted); | ||
} | ||
|
||
// Flip the icon right-to-left on the left side | ||
&.primary-toggle { | ||
transform: scale(-1, 1); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,21 @@ | |
* The primary sidebar on the left. | ||
* e.g., between-pages navigation. | ||
*/ | ||
|
||
.bd-sidebar-primary { | ||
padding-top: 1em; | ||
overflow-y: auto; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
@include media-breakpoint-up(md) { | ||
border-right: 1px solid var(--pst-color-border); | ||
position: sticky; | ||
top: var(--pst-header-height); | ||
z-index: 1000; | ||
max-height: calc(100vh - var(--pst-header-height)); | ||
} | ||
max-height: calc(100vh - var(--pst-header-height)); | ||
position: sticky; | ||
top: var(--pst-header-height); | ||
@include make-col(3); | ||
|
||
// Borders padding and whitespace | ||
padding: 2rem 1rem 1rem 1rem; | ||
border-right: 1px solid var(--pst-color-border); | ||
background-color: var(--pst-color-background); | ||
overflow-y: auto; | ||
|
||
@include scrollbar-style(); | ||
|
||
|
@@ -40,14 +42,13 @@ | |
} | ||
} | ||
} | ||
// Navigation item chevrons | ||
label { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
// height: var(--sidebar-item-height); | ||
height: 30px; | ||
width: 30px; | ||
// width: var(--sidebar-expander-width); | ||
|
||
cursor: pointer; | ||
|
||
|
@@ -86,6 +87,11 @@ | |
/* Between-page links and captions */ | ||
nav.bd-links { | ||
font-size: var(--pst-sidebar-primary-font-size); | ||
margin-right: -1rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @12rambau do you remember why you styled I can plainly see and understand why you set the negative -1rem margin for the in-page TOC in the right sidebar (it's so that the vertical notch that indicates the current section is aligned properly), but so far I haven't been able to figure out what the -1rem margin is doing for the left sidebar. (On the left sidebar, the current section notches are not aligned to any vertical line.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the About the |
||
|
||
@include media-breakpoint-up($breakpoint-sidebar-primary) { | ||
display: block; | ||
} | ||
|
||
ul { | ||
list-style: none; | ||
|
@@ -98,7 +104,7 @@ nav.bd-links { | |
|
||
li > a { | ||
display: block; | ||
padding: 0.25rem 1.5rem; | ||
padding: 0.25rem 0; | ||
color: var(--pst-color-text-muted); | ||
|
||
&:hover { | ||
|
@@ -134,7 +140,6 @@ nav.bd-links { | |
position: relative; | ||
margin-top: 1.25em; | ||
margin-bottom: 0.5em; | ||
padding: 0 1.5rem; | ||
color: var(--pst-color-text-base); | ||
&:first-child { | ||
margin-top: 0; | ||
|
@@ -159,18 +164,6 @@ nav.bd-links { | |
} | ||
} | ||
|
||
// Top-level between-page toc container | ||
.bd-links { | ||
padding-top: 1rem; | ||
padding-bottom: 1rem; | ||
margin-right: -15px; | ||
margin-left: -15px; | ||
|
||
@include media-breakpoint-up(md) { | ||
display: block; | ||
} | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Togglable expand/collapse | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
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.
I'm +1 on this, but just a note that this will be a breaking change so we should note it in the release notes