Skip to content

Commit c67c380

Browse files
committed
fix(pwa): switch to absolute viewport unit in standalone mode
1 parent 13d847b commit c67c380

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/styles/base.scss

+14
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@
1818
--width-40-dvh: 40dvw;
1919
--width-70-dvh: 70dvw;
2020

21+
@media (display-mode: standalone) {
22+
/* height */
23+
--full-height: 100vh;
24+
--half-height: 50vh;
25+
--height-40-dvh: 40vh;
26+
--height-70-dvh: 70vh;
27+
28+
/** width */
29+
--full-width: 100vw;
30+
--half-width: 50vw;
31+
--width-40-dvh: 40vw;
32+
--width-70-dvh: 70vw;
33+
}
34+
2135
/* font variables */
2236
--font-size-xxs: 0.625rem;
2337
--font-size-xs: 0.75rem;

src/styles/mixin.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
scale: 0.95;
7575

7676
&.show {
77-
max-height: 100dvh;
77+
max-height: var(--full-height, 100dvh);
7878
margin-top: initial;
7979
opacity: 1;
8080
transition:

0 commit comments

Comments
 (0)