|
|
|
|
|
by Daiz
1491 days ago
|
|
I've yet to meet a single developer who likes what Apple did with 100vh. And it's why all my projects to date that want to use viewport height in CSS have ended up adding a JS snippet that sets a --vh CSS variable to window.innerHeight on resize, because I have no interest in dealing with Apple's special boy CSS behavior. And really, even Apple itself admits that their 100vh solution is troublesome - they wouldn't have introduced all these new units otherwise! Even if the saner solution would have been to just change their idiosyncratic 100vh behavior to what developers actually expect from it. |
|
These new units do not indicate that Apple's 100vh behavior is "troublesome", they indicate that mobile needs better viewport units than desktop does. Which is why there are three separate new viewport units, to correspond to the three different desired measurements. Even if Apple never changed 100vh behavior, these new set of units are a significant improvement.