100vh is lying to me on mobile, is dvh actually safe to ship now?

greg_ohio

New Member
Messages
71
Reaction score
0
Location
Columbus, OH

Spent my entire evening chasing a bug where the bottom of my slot game gets cut off on Android Chrome and it turns out it's just the damn address bar. Classic.

My layout is a fixed header and then the reels fill whatever's left with height: 100vh. Desktop is perfect. On my Poco it looks fine until the toolbar slides back in, and then my spin button is literally half hidden behind it. Guys on cheap phones must be losing their minds and I don't even blame them lol.

Switched to 100dvh and it's great on Chrome Android. But now I'm paranoid about older browsers. iOS Safari below 15.4 just ignores it and falls back to nothing, right? So I stacked 100vh first then dvh, except now the whole layout jumps when the toolbar hides, which is somehow worse than the original bug. Checked caniuse but that doesn't tell me how it actually feels on a ₹8k phone.

Anyone shipping dvh in production for game or casino UI? Are you using svh or lvh instead? And is the old JS window.innerHeight resize hack dead now or do people still do it? Thanks bhai log 🙏

You must log in or register to reply here.