Skip to content

Commit 394ce92

Browse files
committed
fix: use svh instead of dvh to prevent chart wobble on mobile
1 parent d24d2ac commit 394ce92

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/components/country-map.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ country-map {
1717
// Reserve space before svgmap loads to avoid layout shift
1818
aspect-ratio: auto 2 / 1;
1919
// 550px: comfortable max on large screens (leaves room for navbar, heading, footer on 900px viewports)
20-
// 65dvh: viewport-relative cap so the map never causes vertical scrolling
21-
max-height: min(550px, 65dvh);
20+
// 65svh: viewport-relative cap so the map never causes vertical scrolling
21+
max-height: min(550px, 65svh);
2222

2323
// Propagate max-height into svgmap's padding-based layout
2424
.svgMap-map-wrapper {

src/components/popularity-chart.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
popularity-chart {
44
display: block;
55
// 600px: comfortable max on large screens (leaves room for navbar, heading, footer on 900px viewports)
6-
// 65dvh: viewport-relative cap so the chart never causes vertical scrolling
7-
height: min(600px, 65dvh);
6+
// 65svh: viewport-relative cap so the chart never causes vertical scrolling
7+
height: min(600px, 65svh);
88
position: relative;
99

1010
// prevent scroll bars during graph rendering

0 commit comments

Comments
 (0)