An easy to use library that makes vh units work in iOS Chrome.
vh-fix makes elements with vh units render more consistently in iOS Chrome. It's painless, tiny, and aims to be an easy choice for normalizing vh behavior. You can also read more about how and why I built vh-fix.
- Download vh-fix
- Insert <script src="path/to/vh-fix.js"></script>
- Add class="vh-fix" to elements using vh units
vh-fix aims to be painless, weightless, and easy to use. Currently the goals are to improve it upon those three metrics. In practice, this means removing the need for adding a class name to each vh element, keeping the file size tiny, improving upon its design, adding testing, and preparing it as a npm package. If you have any suggestions for these points or others, I would love to work with you!