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

chore: switching full screen components' height unit from vh to % #81

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

oliver139
Copy link
Collaborator

For mobile device, where the address bar of the browser may likely to be hiding during browsing the page, which makes vh not accurate when it is hiding.

Using dvh or % solves this problem, while for full screen element, I believe that they are the same with % more compatible

dvh coverage is ~92% now
https://caniuse.com/viewport-unit-variants

Or do you think it is safer to use dvh instead?

@oliver139 oliver139 requested a review from antfu October 22, 2024 09:37
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for nijuumaru ready!

Name Link
🔨 Latest commit e8e4175
🔍 Latest deploy log https://app.netlify.com/sites/nijuumaru/deploys/67186608fa299700089116b1
😎 Deploy Preview https://deploy-preview-81--nijuumaru.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu
Copy link
Member

antfu commented Oct 22, 2024

I would presonally prefer to use dvh and fallback to vh if possible

@antfu
Copy link
Member

antfu commented Oct 24, 2024

I guess we probably need a fallback for devices that doesn't support dvh?

@oliver139
Copy link
Collaborator Author

I guess we probably need a fallback for devices that doesn't support dvh?

Yep, just not added yet, will do👌🏻

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.

2 participants