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

Feature: Opt-in to viewport-fit=cover #20

Merged
merged 4 commits into from
Jul 7, 2019
Merged

Conversation

fpapado
Copy link
Owner

@fpapado fpapado commented Jul 7, 2019

viewport-fit=cover opts us in to webkit's "full screen" on iPhone X/XS/XR etc.
Safari will not insert automatic padding, and instead it's on us to use the env variables.

Some potential benefits:

  • A slightly more spacious landscape view
  • A slightly nicer-looking landscape view
  • A more correct solution to bottom padding. Again, it seems wrong that Safari will report "0" for bottom padding if not opting in to full-screen, especially when it is always present

Things to check:

  • Left/right padding on container should be 1rem/calc(inset + 1rem)/max(inset, 1rem), enhancing accordingly
  • Same for header title + nav left/right padding
  • Container top padding should be header/calc(header+inset)
  • Container bottom padding should be ???
  • Header nav bottom padding should be 0.5rem/calc(inset-bottom+0.5rem)/max(inset-bottom, 0.5rem)

@vercel
Copy link

vercel bot commented Jul 7, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://ephemeral-v2-git-feature-viewport-fit-cover.fpapado1.now.sh

@fpapado
Copy link
Owner Author

fpapado commented Jul 7, 2019

Seems ok on browserstack, though real use may differ. Merging to get better data points in practice.

@fpapado fpapado merged commit 97363b7 into master Jul 7, 2019
@fpapado fpapado deleted the feature/viewport-fit-cover branch July 7, 2019 09:04
@fpapado fpapado mentioned this pull request Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant