Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/assets/css/mobile-responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,21 @@ html {
background: var(--bg-primary);
border-right: 1px solid var(--border-color);
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
z-index: 1000;
transform: translateX(-100%);
/*
* Keep the mobile drawer above the backdrop (`.book-sidebar-overlay` is
* 950) but below the fixed header (`.book-header` is 1000). This also
* needs to stay important so the later desktop `.book-sidebar` z-index in
* main.css cannot drop the mobile drawer behind the overlay.
*/
z-index: 999 !important;
/*
* main.css imports this file before declaring the default desktop sidebar
* transform. Keep the closed drawer state important so the later desktop
* `transform: translateX(0)` rule cannot leave the TOC covering content
* on mobile and tablet widths. The checked/open rule below is more
* specific and also important, so the menu button still opens it.
*/
transform: translateX(-100%) !important;
transition: transform 0.3s ease;
}

Expand Down
Loading