Skip to main content
100%

Gist fa954043cfef0a0c69112a156ff518c2

✓ Published0🌍 Public
KKopylovVitalik
Last edited May 20, 2020
Created on May 20, 2020

This example is a CSS code snippet that addresses a mobile browser viewport bug. The code demonstrates a workaround for iPhones where the CSS `100vh` unit incorrectly calculates the viewport height, failing to account for the browser's bottom menu overlay. The fix is implemented by declaring a `min-height` property twice on the `body` element: first with the standard `100vh` value, and then with the `-webkit-fill-available` value for WebKit-based browsers. Additionally, the `html` element receives a `height` of `-webkit-fill-available` to ensure full-page coverage.

AI-generated description

Similar vizzes