📘 DOC: Improve SiteSidebar styles on mobile (#939)

This commit is contained in:
Caleb Jasik 2021-07-29 15:31:18 -05:00 committed by GitHub
parent cd2b5df49c
commit 908139642a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View file

@ -463,5 +463,5 @@ h2.heading {
/* Screenreader Only Text - End */ /* Screenreader Only Text - End */
:target { :target {
scroll-margin-top: 4rem; scroll-margin: calc(var(--theme-sidebar-offset, 5rem) + 2rem) 0 2rem;
} }

View file

@ -214,7 +214,7 @@ if (currentPage) {
} }
:global(.mobile-sidebar-toggle) #sidebar-site { :global(.mobile-sidebar-toggle) #sidebar-site {
display: block; display: block;
top: 0; top: 2rem;
} }
.block { .block {
display: block; display: block;
@ -235,12 +235,14 @@ if (currentPage) {
#sidebar-site { #sidebar-site {
display: flex; display: flex;
padding-left: 2rem; padding-left: 2rem;
position: sticky;
} }
:global(.mobile-sidebar-toggle) { :global(.mobile-sidebar-toggle) {
overflow: initial; overflow: initial;
} }
:global(.mobile-sidebar-toggle) #sidebar-site { :global(.mobile-sidebar-toggle) #sidebar-site {
display: flex; display: flex;
top: 0;
} }
.menu-toggle { .menu-toggle {
display: none; display: none;
@ -254,9 +256,6 @@ if (currentPage) {
#article { #article {
grid-column: 2; grid-column: 2;
} }
#sidebar-site {
position: sticky;
}
#sidebar-content { #sidebar-content {
/* display: flex; */ /* display: flex; */
grid-column: 3; grid-column: 3;