fix: banner pushing hero below viewport fold#662
Open
RisingOrange wants to merge 6 commits intoPauseAI:mainfrom
Open
fix: banner pushing hero below viewport fold#662RisingOrange wants to merge 6 commits intoPauseAI:mainfrom
RisingOrange wants to merge 6 commits intoPauseAI:mainfrom
Conversation
👷 Deploy request for pauseai pending review.Visit the deploys page to approve it
|
9865125 to
818274f
Compare
Merged
Collaborator
Wrap banners and hero-section in a flex column container (page-top) with height: 100dvh on hero pages, so the hero fills whatever vertical space remains after banners. Change Hero height from 100vh to 100% to fill the flex child. Fix layout grid rows for hero pages (main + footer only).
The nav (position: absolute, left: 0, right: 0) now lives in page-top (full viewport width) instead of inside .layout (40rem max, 3rem padding). This caused --cqw container-query values to change, breaking logo positioning and link spacing. Fix: constrain the nav's absolute position to the same width as .layout's content area (min(100%, page-width) - 6rem), centered via margin-inline: auto.
Previous fix wrongly applied: min(100vw, page-width) - 6rem With box-sizing: content-box, .layout's content area (where hero-section lives) is min(page-width, 100vw - 6rem) — the padding is subtracted from the viewport, not from the max-inline-size. The correct formula matches the actual content-box width of .layout. Previously gave 544px at 800px viewport; correct is 640px.
a9f49be to
4aeab4d
Compare
On wide viewports (2560px+), the hero image's intrinsic aspect ratio inflated the hero-section flex item via min-height: auto, overflowing the 100dvh container and collapsing banners to zero height. - Add min-height: 0 on .hero-section to override flex min-height: auto - Add flex-shrink: 0 on banner flex items to prevent future shrinkage - Cap .hero min-height with min() so it can't exceed parent on short viewports
Contributor
Author
Good catch! Fixed in 547d1fa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #661
What
When a banner is active, the hero section (
height: 100vh) starts below it and extends off-screen, breaking the full-viewport effect.Note: The screenshots also show how the mobile layout is incorrectly used on vertical desktop instead of the desktop layout. This will be fixed by #668
How
Key changes:
page-topwrapper wraps both the banners andhero-section. On hero pages it becomes aheight: 100dvhflex column, so its children share the full viewport height.page-top(previously they were in normal flow above.layout). They take their natural height, leaving the rest for the hero.hero-sectionmoved out of.layoutand intopage-top, where it getsflex: 1to fill whatever space the banners don't use.Heroheight changed from100vhto100%, so it fills its flex parent instead of the full viewport.min(var(--page-width), 100vw - 6rem)— the nav is absolutely positioned insidehero-section, which moved from the width-constrained.layoutto full-widthpage-top. This constraint replicates the width it previously inherited, keeping all container-query-based layout calculations unchanged.min-height: 0on.hero-sectionoverrides the flex item defaultmin-height: auto, which caused the hero image's intrinsic size to inflate the flex item on wide viewports, squishing banners to zero height (Firefox).flex-shrink: 0on banner elements prevents future shrinkage..heromin-height capped withmin()to avoid overflow on short viewports.Before (hero page):
After (hero page):
Testing
100dvh