Skip to content

Commit a7ae631

Browse files
committed
Fix mobile sidebar closed state
1 parent 2445c51 commit a7ae631

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/assets/css/mobile-responsive.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@
5050
border-right: 1px solid var(--border-color);
5151
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
5252
z-index: 1000;
53-
transform: translateX(-100%);
53+
/*
54+
* main.css imports this file before declaring the default desktop sidebar
55+
* transform. Keep the closed drawer state important so the later desktop
56+
* `transform: translateX(0)` rule cannot leave the TOC covering content
57+
* on mobile and tablet widths. The checked/open rule below is more
58+
* specific and also important, so the menu button still opens it.
59+
*/
60+
transform: translateX(-100%) !important;
5461
transition: transform 0.3s ease;
5562
}
5663

0 commit comments

Comments
 (0)