Skip to content

Commit 1802f8f

Browse files
docs: fix sidebar in mobile mode
1 parent 405e3a0 commit 1802f8f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/docs/css/custom.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,6 +3267,47 @@ img.hero-logo.dark-only,
32673267
color: #e9a033;
32683268
}
32693269

3270+
/* ==================== */
3271+
/* MOBILE SIDEBAR FIX */
3272+
/* ==================== */
3273+
3274+
@media screen and (max-width: 76.1875em) {
3275+
/* Move overlay to not cover sidebar area */
3276+
.md-overlay {
3277+
left: 12.1rem !important;
3278+
width: calc(100% - 12.1rem) !important;
3279+
}
3280+
3281+
/* When drawer is open, clip header to not overlap sidebar */
3282+
[data-md-toggle="drawer"]:checked ~ .md-header {
3283+
clip-path: inset(0 0 0 12.1rem) !important;
3284+
}
3285+
3286+
/* Ensure sidebar is visible */
3287+
.md-sidebar--primary {
3288+
z-index: 9999 !important;
3289+
}
3290+
3291+
/* Fix double-tap issue on touch devices */
3292+
.md-nav__link,
3293+
.md-nav__item > label,
3294+
.md-nav__item label[for],
3295+
.md-nav__toggle ~ label,
3296+
.md-nav label,
3297+
.md-sidebar--primary label {
3298+
touch-action: manipulation !important;
3299+
-webkit-tap-highlight-color: transparent;
3300+
cursor: pointer !important;
3301+
}
3302+
3303+
/* Ensure toggle labels are immediately clickable */
3304+
.md-nav__item--nested > input + label,
3305+
.md-nav__item--nested > label {
3306+
pointer-events: auto !important;
3307+
touch-action: manipulation !important;
3308+
}
3309+
}
3310+
32703311
/* ==================== */
32713312
/* RESPONSIVE */
32723313
/* ==================== */

0 commit comments

Comments
 (0)