Skip to content

Commit c98c36b

Browse files
committed
fix(css): mobile-menu only visible when active class is toggled
1 parent 7a09e30 commit c98c36b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sass/main.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ a {
286286

287287
// Mobile menu
288288
.mobile-menu {
289+
display: none;
289290
position: fixed;
290291
top: var(--nav-height);
291292
right: 0;
@@ -294,12 +295,13 @@ a {
294295
height: calc(100vh - var(--nav-height));
295296
background: #fff;
296297
z-index: 95;
297-
transform: translateX(100%);
298-
transition: transform 0.3s ease;
299298
overflow-y: auto;
300299
padding: 1rem;
300+
transform: translateX(100%);
301+
transition: transform 0.3s ease;
301302

302303
&.active {
304+
display: block;
303305
transform: translateX(0);
304306
}
305307
}

0 commit comments

Comments
 (0)