Skip to content

Commit 7d7cb12

Browse files
authored
Merge pull request #59 from arm-university/Challenge_Page
Header Layout Fix
2 parents 24eaadc + 849f5b5 commit 7d7cb12

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/_sass/components/_header.scss

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@
8484

8585
.navigation {
8686
@include overflow(auto, "x");
87+
88+
/* Hide navigation on mobile by default */
89+
@media (max-width: 768px) {
90+
display: none !important;
91+
92+
&.navigation--open {
93+
display: block !important;
94+
}
95+
}
96+
8797
& > ul {
8898
height: map-get($layout, header-height);
8999
padding-bottom: 0;
@@ -235,8 +245,9 @@
235245
}
236246
}
237247

238-
/* Mobile Related Layout */
239-
248+
/* ============= */
249+
/* MOBILE NAVIGATION */
250+
/* ============= */
240251

241252
@media (max-width: 768px) {
242253
.header {
@@ -261,21 +272,18 @@
261272
}
262273

263274
.navigation {
264-
display: none;
265275
position: absolute;
266276
top: 100%;
267277
left: 0;
268278
right: 0;
269279
background: $header-background;
270280
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
271281
z-index: 1000;
272-
max-height: 0;
273282
overflow: hidden;
274-
transition: max-height 0.3s ease;
275283

276284
&.navigation--open {
277-
display: block;
278285
max-height: 500px;
286+
overflow: visible;
279287
}
280288

281289
& > ul {

0 commit comments

Comments
 (0)