-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 footer not visible on some mobile browsers #36
Conversation
WalkthroughThis update focuses on refining the responsiveness and style of a Vue component by adjusting its CSS classes. The key modification involves transitioning from Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- app.vue (1 hunks)
Additional comments: 1
app.vue (1)
- 130-130: The change from
min-h-screen
tomin-h-dvh
in the template section is a targeted fix to address the footer visibility issue on mobile browsers. This approach assumesmin-h-dvh
is a custom class that better handles the dynamic viewport height (vh
) on mobile devices. Ensure that the corresponding CSS formin-h-dvh
is defined and correctly implements the intended behavior across different mobile browsers. Testing on actual devices or using browser emulation tools would be beneficial to confirm the effectiveness of this fix.
app.vue
Outdated
@@ -127,7 +127,7 @@ else { | |||
</script> | |||
|
|||
<template> | |||
<div class="md:pl-[5vw] font-sans text-white min-h-screen min-w-screen flex flex-col items-start justify-start"> | |||
<div class="md:pl-[5vw] font-sans text-white min-h-dvh min-w-screen flex flex-col items-start justify-start"> |
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.
this looks great but do we need to add anything for browsers that don't support dvh, e.g. a fallback? Maybe we could add a custom rule in uno config to add multiple properties including the 100vh fallback?
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.
Yip. We should def do that. Though it is quite widely supported now.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- app.vue (1 hunks)
- nuxt.config.ts (1 hunks)
Additional comments: 2
nuxt.config.ts (1)
- 15-18: The addition of the
unocss
rule formin-h-screen
specifies a minimum height of100vh
and assigns it to a_fallback
layer. This change seems to align with the PR's objective to address footer visibility issues on mobile browsers by adjusting the minimum height styling. However, it's important to ensure that this rule does not conflict with other CSS rules or negatively impact other components' styling. Additionally, consider documenting the rationale behind using the_fallback
layer for future reference and clarity.app.vue (1)
- 131-131: The addition of the
min-h-dvh
class to thediv
element in the template section is a direct response to the PR's objective of fixing footer visibility issues on some mobile browsers. This change aims to ensure that the footer remains visible across all mobile browsers by adapting to the dynamic nature of the viewport height. It's crucial to verify that this new class (min-h-dvh
) is defined elsewhere in the project's CSS with the intended properties to handle the dynamic viewport height effectively. Additionally, testing on actual mobile devices, especially on the mentioned iOS versions of Safari and Chrome, would be beneficial to confirm the effectiveness of this solution.
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.
Thank you! |
Hi Daniel,
Small fix to keep footer viewable when
vh
is dynamic. Here are some pics of issue on latest IOS (Safari and Chrome). Wasn't able to test on mobile device but should work - else we can usesvh
.Summary by CodeRabbit