Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applemail on iOS 15 renders vh units as 0 #94

Open
M-J-Robbins opened this issue Jun 28, 2021 · 1 comment
Open

Applemail on iOS 15 renders vh units as 0 #94

M-J-Robbins opened this issue Jun 28, 2021 · 1 comment
Labels
Apple Mail macOS and iOS

Comments

@M-J-Robbins
Copy link
Contributor

M-J-Robbins commented Jun 28, 2021

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.

@hteumeuleu hteumeuleu added the Apple Mail macOS and iOS label Jun 28, 2021
@hteumeuleu
Copy link
Owner

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apple Mail macOS and iOS
Projects
None yet
Development

No branches or pull requests

2 participants