Skip to content

Commit

Permalink
chore: handle nav-stack z-index and sticky display group z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmcquade committed Dec 2, 2024
1 parent 14b3abb commit 9fd016c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ion-modal.nav-stack-modal {
--box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--backdrop-opacity: 0.5;

z-index: calc(10 + var(--nav-stack-index));

// Override defalut ion-modal behaviour of hiding backdrop for subsequent modals after first
&:not([data-nav-stack-index="0"]) {
--backdrop-opacity: 0.2 !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
width: 100vw;
display: flex;
justify-content: center;
// nav-stacks have a z-index of (10 + var(--nav-stack-index))
z-index: calc(10 + var(--nav-stack-index, 0));
}

&[data-sticky="top"] {
Expand Down

0 comments on commit 9fd016c

Please sign in to comment.