-
Notifications
You must be signed in to change notification settings - Fork 63
Fix the header scrolling by using min-height instead of height #2152
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/2152 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: -584 B (0%) Total Size: 902 kB
ℹ️ View Unchanged
|
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.
@@ -208,7 +208,7 @@ export default { | |||
|
|||
<style scoped> | |||
.app { | |||
@apply h-screen h-[100dvh]; | |||
@apply min-h-screen min-h-[100dvh]; |
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'm still unsure how the priority of these two is set. They have the same specificity and target the same CSS property.
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.
If the device supports dvh
, then the last property is used.
If it does not support dvh
, then the last property is discarded, and h-screen (100vh) is used.
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.
But what if a device supports dvh
but somehow the min-h-screen
appears later and the device prioritises that?
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.
We'll need to find a way to set h-screen h-[100dvh]
on the full-height, yellow background pages (home, 404) and use min-h-screen min-h-[100dvh]
on all the other routes, in order to fix this problem everywhere.
I guess the best way is to split the layouts again :) Here's the PR: #2155 I think 🤞 it finally works |
Closing in favor of #2155 |
Fixes
Fixes #2150 by @obulat
Description
This PR replaces the
h-100dvh
withmin-h-100dvh
for theapp
layout to fix the header scrolling.Testing Instructions
Checkout the PR and test that the height is correct on all pages, both on mobile and desktop, especially iOS.
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin