The ultimate guide to CSS Viewport Units

Ahmad Shadeed has done an extensive write-up on Viewport Units:

In this article, we will learn about CSS viewport units and how to use them, along with some use-cases and solutions for common issues. Let’s start and dig in!

It’s great to see that it’s an all-in-one article, covering use cases such as Viewport Unit Based Typography and Breaking Elements out of Their Containers.

Regarding Mobile Safari (iOS) not properly calculating 100vh the article mentions Louis Hoebregts’ solution which uses CSS Custom Properties to correctly set 1vh. In addition to that I can say I’ve had good results using Viewport Units Buggyfill in the past. A shame Apple still hasn’t fixed this issue.

CSS Viewport Units →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Join the Conversation

2 Comments

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.