Only bump z-index when nav is open

This commit is contained in:
Andy Smith
2025-12-29 11:02:19 -06:00
parent 19d5a6a22c
commit 7f1bf76588
3 changed files with 10 additions and 8 deletions
+4 -3
View File
@@ -74,12 +74,13 @@
--z-events-column-header: 1;
--z-events-day-header: 3;
--z-popup: 10;
--z-nav: 20;
--z-flash: 30;
--z-tooltip: 40;
--z-bar: 50;
--z-tray: 51;
--z-welcome: 52;
--z-nav: 60;
--z-flash: 70;
--z-tooltip: 80;
--z-nav-open: 100;
/* OKLCH colors: Fixed */
--lch-black: 0% 0 0;
+6
View File
@@ -15,6 +15,8 @@
max-inline-size: 100dvw;
padding-block: calc(var(--block-space-half) + env(safe-area-inset-top)) var(--block-space-half);
padding-inline: var(--main-padding);
position: relative;
z-index: var(--z-nav);
/* Change the grid size depending on how many buttons are present */
&:has(.header__actions > *:nth-child(1)) { --header-button-count: 1; }
@@ -25,6 +27,10 @@
row-gap: 0;
}
&:has(dialog[open]) {
z-index: var(--z-nav-open);
}
&:has(~ #main .card-columns) {
inline-size: 100dvw;
margin-inline: auto;
-5
View File
@@ -22,11 +22,6 @@
max-inline-size: 100dvw;
}
:where(#header) {
position: relative;
z-index: var(--z-nav);
}
:is(#header, #footer) {
@media print {
display: none;