mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-17 00:15:51 +00:00
🐛 Let the fullscreen mobile menu escape the floating header
The floating header's backdrop blur makes the pill a containing block for fixed-position descendants, so the fullscreen mobile menu rendered at the pill's height instead of filling the viewport. Lift the filter while the menu is open. Fixes #3057. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
587d8eec1d
commit
ca56ac78a3
3 files changed
+14
-1
No files matched your search
@@ -4900,6 +4900,10 @@ body:has(#mobile-menu-toggle:checked) {
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
transition: visibility 0.3s, opacity 0.3s ease-in-out;
|
transition: visibility 0.3s, opacity 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
header > div:has(.mobile-menu-fullscreen #mobile-menu-toggle:checked) {
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
backdrop-filter: none;
|
||||||
|
}
|
||||||
.nested-menu:nth-last-child(-n + 3) .menuhide, .mobile-header-row .menuhide {
|
.nested-menu:nth-last-child(-n + 3) .menuhide, .mobile-header-row .menuhide {
|
||||||
inset-inline-end: 0;
|
inset-inline-end: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -485,6 +485,15 @@ body:has(#mobile-menu-toggle:checked) {
|
|||||||
opacity 0.3s ease-in-out;
|
opacity 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* A backdrop-filter turns the header pill into a containing block for
|
||||||
|
position:fixed descendants, which would trap the fullscreen mobile menu
|
||||||
|
inside it. Lift the filter while that menu is open — the fullscreen
|
||||||
|
overlay covers the header anyway, so the change is invisible. */
|
||||||
|
header > div:has(.mobile-menu-fullscreen #mobile-menu-toggle:checked) {
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
backdrop-filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Dropdowns near the end of the bar open leftward so they stay on screen */
|
/* Dropdowns near the end of the bar open leftward so they stay on screen */
|
||||||
.nested-menu:nth-last-child(-n + 3) .menuhide,
|
.nested-menu:nth-last-child(-n + 3) .menuhide,
|
||||||
.mobile-header-row .menuhide {
|
.mobile-header-row .menuhide {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ $mobileMenuStyle := .Site.Params.header.mobileMenuStyle | default "fullscreen" }}
|
{{ $mobileMenuStyle := .Site.Params.header.mobileMenuStyle | default "fullscreen" }}
|
||||||
<div class="mobile-header-row relative flex items-center h-14 gap-4">
|
<div class="mobile-header-row{{ if eq $mobileMenuStyle "fullscreen" }} mobile-menu-fullscreen{{ end }} relative flex items-center h-14 gap-4">
|
||||||
{{ if hugo.IsMultilingual }}
|
{{ if hugo.IsMultilingual }}
|
||||||
{{ partial "header/components/translations.html" . }}
|
{{ partial "header/components/translations.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in new issue
Block a user