fix(routes/index): hold the hero height with 'svh' instead of 'dvh' - #1115
Merged
Conversation
📝 WalkthroughWalkthroughThe hero container now uses ChangesHero viewport sizing
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | f57839a | Commit Preview URL Branch Preview URL |
Aug 05 2026, 03:06 AM |
sukvvon
marked this pull request as ready for review
August 5, 2026 03:08
SeanCassiere
approved these changes
Aug 5, 2026
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.
On iOS, scrolling the landing page makes the hero card jump taller mid-scroll.
Cause
The hero is sized with
h-[calc(100dvh-var(--navbar-height))]. The dynamic viewport unit tracks the URL bar: as Safari collapses it during a scroll,100dvhgrows and the card grows with it. That is the unit behaving as specified — it just isn't what a full-bleed hero wants.svhresolves against the small viewport (URL bar expanded) and does not change while scrolling, so the card keeps its height.Scope
Only the hero. I went through the other 21
dvhusages and none have the same problem — the symptom needs a page that scrolls, a fixed height, and an element that visibly fills the viewport, and only the hero has all three:h-on game/builder/sidebaroverflow-hiddenor self-scrolling, so the page never scrolls and the URL bar never collapsesmax-hon sidebars, TOC, drawersmin-hSearchModalmin(...)styles/shop.cssalready usessvhfor the product sheet, so the unit is not new here.Testing
Confirmed on an iPhone: the hero no longer stretches mid-scroll.
Desktop is unchanged by construction — with no collapsible URL bar,
svh,lvh,dvh, andvhall resolve identically (886px for all four locally), andmax-h-[720px]caps the hero at 720px either way. The change only has an effect wheresvh < lvh, which is why a real device was the only way to verify it.Summary by CodeRabbit