Skip to content

Commit 75edcd9

Browse files
committed
Fix hamburger menu on mobile
Resolves #1699. This still isn't great, on a sufficiently small screen, there's no way to actually close the menu... but that's been a problem for ages with no complaints yet, and I'm hoping it'll be addressed with the redesign.
1 parent f74762e commit 75edcd9

File tree

3 files changed

+56
-9
lines changed

3 files changed

+56
-9
lines changed

.config/typedoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"excludePrivate": true,
1414
"excludeInternal": true,
1515
"treatWarningsAsErrors": false,
16-
"listInvalidSymbolLinks": true,
16+
"validation": true,
1717
"logLevel": "Verbose"
1818
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
- Source code links now work with Bitbucket repositories.
77
- Added `githubPages` option (default: true), which will create a `.nojekyll` page in the generated output.
88

9+
### Bug Fixes
10+
11+
- Fixed the hamburger menu not being visible on mobile devices, fixes #1699.
12+
913
### Thanks!
1014

1115
- @srmagura

static/style.css

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,22 +414,22 @@ blockquote {
414414
}
415415

416416
@media (min-width: 901px) and (max-width: 1024px) {
417-
html.default .col-content {
417+
html .col-content {
418418
width: 72%;
419419
}
420-
html.default .col-menu {
420+
html .col-menu {
421421
width: 28%;
422422
}
423-
html.default .tsd-navigation {
423+
html .tsd-navigation {
424424
padding-left: 10px;
425425
}
426426
}
427427
@media (max-width: 900px) {
428-
html.default .col-content {
428+
html .col-content {
429429
float: none;
430430
width: 100%;
431431
}
432-
html.default .col-menu {
432+
html .col-menu {
433433
position: fixed !important;
434434
overflow: auto;
435435
-webkit-overflow-scrolling: touch;
@@ -445,10 +445,10 @@ blockquote {
445445
background-color: var(--color-panel);
446446
transform: translate(100%, 0);
447447
}
448-
html.default .col-menu > *:last-child {
448+
html .col-menu > *:last-child {
449449
padding-bottom: 20px;
450450
}
451-
html.default .overlay {
451+
html .overlay {
452452
content: "";
453453
display: block;
454454
position: fixed;
@@ -460,6 +460,50 @@ blockquote {
460460
background-color: rgba(0, 0, 0, 0.75);
461461
visibility: hidden;
462462
}
463+
464+
.to-has-menu .overlay {
465+
animation: fade-in 0.4s;
466+
}
467+
468+
.to-has-menu :is(header, footer, .col-content) {
469+
animation: shift-to-left 0.4s;
470+
}
471+
472+
.to-has-menu .col-menu {
473+
animation: pop-in-from-right 0.4s;
474+
}
475+
476+
.from-has-menu .overlay {
477+
animation: fade-out 0.4s;
478+
}
479+
480+
.from-has-menu :is(header, footer, .col-content) {
481+
animation: unshift-to-left 0.4s;
482+
}
483+
484+
.from-has-menu .col-menu {
485+
animation: pop-out-to-right 0.4s;
486+
}
487+
488+
.has-menu body {
489+
overflow: hidden;
490+
}
491+
.has-menu .overlay {
492+
visibility: visible;
493+
}
494+
.has-menu :is(header, footer, .col-content) {
495+
transform: translate(-25%, 0);
496+
}
497+
.has-menu .col-menu {
498+
visibility: visible;
499+
transform: translate(0, 0);
500+
display: grid;
501+
grid-template-rows: auto 1fr;
502+
max-height: 100vh;
503+
}
504+
.has-menu .tsd-navigation {
505+
max-height: 100%;
506+
}
463507
}
464508

465509
.tsd-page-title {
@@ -819,7 +863,6 @@ footer .tsd-legend {
819863
.tsd-navigation.secondary {
820864
max-height: calc(100vh - 1rem - 40px);
821865
overflow: auto;
822-
position: -webkit-sticky;
823866
position: sticky;
824867
top: calc(0.5rem + 40px);
825868
transition: 0.3s;

0 commit comments

Comments
 (0)