email-bugs
email-bugs copied to clipboard
Applemail on iOS 15 renders vh units as 0
vh
units have always been a little off in Applemail as they render from the email height rather than the viewport height.
However in iOS15 it now looks like they are rendering as 0
no matter what size vh
is set.
They aren't used often but if you need them the best solution is probably to use max()
and set a fallback value height:max(100vh, 200px)
.
vw
units are working as expected.
Finally got my hands on iOS 15 public beta 1 and I confirm the issue. Here's a test code I used.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>iOS 15 vh test</title>
</head>
<body style="margin:0;">
<div style="background:green; height:100vh;">
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Est, ducimus illo, vel officiis quibusdam quidem quas nemo, laborum aut laudantium itaque dicta temporibus. Possimus dolores facilis, quos tempore dicta inventore.
</div>
</body>
</html>