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

fix(default): update layout to use dynamic vh #1817

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

markpinero
Copy link
Contributor

@markpinero markpinero commented Feb 24, 2023

This PR fixes issue #1279 which overflows the user avatar section and footer. The issue is documented here, where 100vh will take 100% of viewport height regardless of UI chrome. This is solved using the dvh unit which changes based on the UI.

This issue only affects tablets at >1280px width (eg: 11/13in iPad Pro).

I'm not very knowledgable in unocss syntax, but copied the scrollbar-hide implementation since it applies a non-standard CSS rule-set. Reason being is if they are applied directly to tag (eg: <div h-screen h-100dvh>, it can not apply correctly if h-screen is after h-100dvh in the stylesheet.

The CSS rule I created merges the two to read like so:

.h-100dvh {
  height: 100vh;
  height: 100dvh;
}

Where it will apply 100dvh where it is supported, and 100vh elsewhere.

@stackblitz
Copy link

stackblitz bot commented Feb 24, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Feb 24, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 00aa070
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63f844e739b3e20007c87dc0

@netlify
Copy link

netlify bot commented Feb 24, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 00aa070
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63f844e7b3f6c00008f34ec6
😎 Deploy Preview https://deploy-preview-1817--elk-zone.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 settings.

@Shinigami92 Shinigami92 added the c: ui Enhancing UI label Feb 25, 2023
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry it took us a while to merge it

@patak-dev patak-dev merged commit 99dc8a0 into elk-zone:main Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: ui Enhancing UI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants