Skip to content

Commit

Permalink
Use svh height to ensure consistent modal layout
Browse files Browse the repository at this point in the history
Ensures a more consistent layout on mobile devices by accounting for dynamic changes in viewport height caused by browser UI elements, such as the address bar in Chrome.
  • Loading branch information
kasperbirch1 committed Dec 18, 2024
1 parent 409a614 commit 21485f6
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: 100vh;
height: 100svh;
overflow: auto;

&__screen-reader-description {
Expand Down Expand Up @@ -51,7 +51,7 @@
right: 0;
max-width: 560px;
width: 100%;
height: 100vh;
height: 100svh;
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: 100vh;
height: 100svh;
width: 100%;
left: auto;

Expand Down

0 comments on commit 21485f6

Please sign in to comment.