Skip to content

Commit

Permalink
Use dvh instead of svh for modals
Browse files Browse the repository at this point in the history
The `svh` unit makes the opening hours modal start below the mobile address bar as desired, but it has unwanted behavior when scrolling.
  • Loading branch information
kasperbirch1 committed Dec 18, 2024
1 parent 21485f6 commit f0bd976
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/stories/Library/Modals/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
opacity: 0;
display: none;
transition: opacity 0.3s;
height: 100svh;
height: 100dvh;
overflow: auto;

&__screen-reader-description {
Expand Down Expand Up @@ -51,7 +51,7 @@
right: 0;
max-width: 560px;
width: 100%;
height: 100svh;
height: 100dvh;
margin: 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Library/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Apply custom
background-color: $color__global-primary;
position: fixed;
height: 100svh;
height: 100dvh;
width: 100%;
left: auto;

Expand Down

0 comments on commit f0bd976

Please sign in to comment.