Skip to content

Commit 12daa1c

Browse files
committed
Header: Fixed mobile menu falling out of header
Changed button to be within-DOM rather than absolute positioned. Also improves RTL handling by showing menu on the right side. Fixes #4841
1 parent ff8daad commit 12daa1c

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

resources/sass/_header.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,30 +205,22 @@ header .search-box.search-active:focus-within {
205205
border: 2px solid rgba(255, 255, 255, 0.8);
206206
border-radius: 4px;
207207
padding: 0 $-xs;
208-
position: absolute;
209-
right: $-m;
210-
top: 13px;
211208
line-height: 1;
212209
cursor: pointer;
213210
user-select: none;
214211
svg {
215212
margin: 0;
216213
bottom: -2px;
217214
}
218-
@include rtl() {
219-
left: $-m;
220-
right: auto;
221-
}
222215
}
223216

224217

225-
226218
@include smaller-than($l) {
227219
header .header-links {
228220
@include lightDark(background-color, #fff, #333);
229221
display: none;
230222
z-index: 10;
231-
right: $-m;
223+
inset-inline-end: $-m;
232224
border-radius: 4px;
233225
overflow: hidden;
234226
position: absolute;

resources/views/layouts/parts/header.blade.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<header id="header" component="header-mobile-toggle" class="primary-background px-xl grid print-hidden">
2-
<div>
2+
<div class="flex-container-row justify-space-between gap-s items-center">
33
@include('layouts.parts.header-logo')
4-
<button type="button"
5-
refs="header-mobile-toggle@toggle"
6-
title="{{ trans('common.header_menu_expand') }}"
7-
aria-expanded="false"
8-
class="mobile-menu-toggle hide-over-l">@icon('more')</button>
4+
<div class="hide-over-l py-s">
5+
<button type="button"
6+
refs="header-mobile-toggle@toggle"
7+
title="{{ trans('common.header_menu_expand') }}"
8+
aria-expanded="false"
9+
class="mobile-menu-toggle">@icon('more')</button>
10+
</div>
911
</div>
1012

1113
<div class="flex-container-column items-center justify-center hide-under-l">

0 commit comments

Comments
 (0)