-
Notifications
You must be signed in to change notification settings - Fork 63
Set layout height to 100dvh with fallback to 100vh #2115
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/2115 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
Size Change: -10.4 kB (-1%) Total Size: 887 kB
ℹ️ View Unchanged
|
@obulat not related to the changes in this PR, I noticed that desktop safari needs the homepage to explicitly have
I think it's some kind of bug related to min-height, flex containers, and sticky flex children 😢 I will test this on a browser that doesn't support |
1d1f6dc
to
f51a5fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this LGTM! I'm seeing things look right on desktop and mobile in chrome, firefox, and safari.
Co-authored-by: Zack Krida <zackkrida@pm.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes
Fixes #2110 by @obulat
Description
This PR fixes the bug where the bottom of the screen is cut-off and hidden behind the address bar on mobiles by using
dvh
units for screen height.Currently, the support for them is below 80%, so as a fallback, we set the height to 100 vh but also add a bottom padding to the modals to make sure that clickable elements are not hidden.
Testing Instructions
Run the app and test it on a mobile. You should see the WordPress logo in the footer. When you input something in the hompage searchbar, even the bottom part of the screen should remain yellow. When you open modal (content switcher on homepage), none of it should be hidden.
I don't have a phone to test the fallback, it would be nice if someone could test it on a real device.
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin