Hacker News new | ask | show | jobs
by EvRev 1822 days ago
It is a bug when you use VH instead of VW on your height attribute. Always use VW on mobile because of the default behavior on mobile browsers to show the address bar when scrolling.
1 comments

But that breaks a lot of design assumptions, since many times the use of vh vs vw is to avoid assuming which of the height or width is greater. You’d have to use a min/max calculation to avoid aspect ratio mayhem whn comparing landscape to portrait.

The real big is UI elements that randomly appear and disappear in the browser chrome, such as scroll bars and address bars, that contribute to vh/vw randomly spazzing.