Repository navigation
fix(mobile): sticky header, remove horizontal scrollbar, contain overflow - #181
Merged
ycagel merged 1 commit intoAug 19, 2026
Merged
Conversation
- html: overflow-x: clip (prevents horizontal scrollbar without creating a scroll container, so position: sticky keeps working) - body: drop height: 100% (a fixed-height body plus overflowing content broke position: sticky on the header); min-height: 100svh already handles the fill-viewport case - section: overflow-x: clip so decorative art (e.g. .hero__art-ring--2 on DigiDollar with inset: -25%) can't push body wider than the viewport, which was also displacing the fixed .scroll-top button off-screen on mobile - .btn: allow wrapping under 560px (overflow-wrap: anywhere) so long labels like 'DigiByte Technical Architecture (White Paper)' fit inside the viewport
ycagel
requested review from
DGBNOOB,
JaredTate,
bastiandriessen,
gto90 and
ycagel
August 19, 2026 13:09
DGBNOOB
approved these changes
Aug 19, 2026
DGBNOOB
left a comment
Member
There was a problem hiding this comment.
fix(mobile): sticky header, remove horizontal scrollbar, contain overflow — #181
Conversation comment by Dennis Pitallano includes the Preview (https://dg-bio.vercel.app/en-us/), the problem, root cause, fix, verification steps, screenshots, and notes.
Commits: 9c1f25e Files changed:
• css/base.css
• css/components.css
• css/dgb.min.css
I opened the website in a mobile browser to identify the issues. I observed:
- The header disappears when scrolling down.
- The page shifts horizontally, leaving a gap on the right side.
- The Back to Top button is partially off the page.
- The “DigiByte Technical Architecture (White Paper)” button is also off the page.
When viewing the preview, the DigiByte header stays in place while scrolling from top to bottom. The page no longer shifts horizontally or shows a right side gap. The DigiByte Technical Architecture (White Paper) button now wraps correctly, is centered, and remains fully on the page. The Back to Top button is also properly positioned.
The only issue I noticed is that the Back to Top button requires at least two presses: the first press triggers a glow effect, and the second press scrolls the page to the top. This may be intentional behavior to prevent accidental activation, but I wanted to note it.
The three changed files are CSS, which may require a more technical reviewer for deeper verification. However, the problem, root cause, fix, verification steps, screenshots, and notes provide a clear explanation, and all fixes are visible in the preview (https://dg-bio.vercel.app/en-us/).
This review was not tested beyond comparing the live website with the preview containing the fixes. If the Vercel preview is considered sufficient for validation, then I recommend approval.
cACK
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.
Mobile: sticky header + no horizontal scroll
Preview (deploys from my fork): https://dg-bio.vercel.app/en-us/
The problem
On mobile viewports the site had three related layout bugs:
header.navhasposition: sticky; top: 0, but scrolling the page caused it to slide off with the content..scroll-top"back to top" button was clipped off-screen on the right, and the "DigiByte Technical Architecture (White Paper)" ghost button overflowed the viewport.Root cause
All three symptoms trace back to two lines in
css/base.css:body { overflow-x: hidden }forcesoverflow-ytoautoon the same element (per the CSS overflow shorthand rule), which turns<body>into a scroll container. Combined withbody { height: 100% },<body>becomes a fixed-height scroll port and the sticky header sticks inside body rather than to the viewport — so it scrolls away with the page..hero__art-ring--2on the DigiDollar section usesinset: -25%) pushed the body's rendered width past the viewport. That extended the layout viewport used byposition: fixed, which is why.scroll-top(right: 16px) landed ~25 px off-screen on a 390 px viewport..btnprimitive globally setswhite-space: nowrap, so the long white-paper link couldn't wrap on narrow screens.The fix
Three small, self-contained CSS changes (no HTML/JS touched):
css/base.csshtml { overflow-x: clip }, dropheight: 100%on<body>(kept on<html>;min-height: 100svhon body already handles the fill-viewport case), and addoverflow-x: cliptosectionso decorative art can't push the body wider than the viewport.css/components.css@media (max-width: 560px), allow.btnto wrap (white-space: normal; overflow-wrap: anywhere). Alsotext-align: center; max-width: 100%andflex: noneon the button icon so an icon can't push text past the edge.css/dgb.min.cssnode tools/build-css.mjs.overflow-x: clip(vs.hidden) prevents the horizontal scrollbar without creating a scroll container, soposition: stickykeeps working.Verification
On a 390 × 844 mobile viewport of the preview build:
document.documentElement.scrollWidth === clientWidth→ no horizontal scroll.window.scrollTo(100, 0)leavesscrollX === 0..nav.getBoundingClientRect().top === 0at every scroll offset past the ticker..scroll-topsits atright: 16pxinside the viewport again.Screenshots (390 × 844, en-us)
Hero + sticky nav landing:
Sticky nav pinned mid-scroll with
.scroll-topcorrectly placed:Long ghost button now wraps to multiple lines inside the viewport:
Notes
index.htmlfiles are untouched.overflow-x: cliponsectionmatches the intended behavior on wider viewports where the decorative rings already fit inside their grid cells.overflow-x: clipis supported in all current evergreen browsers (Chrome/Edge 90+, Firefox 81+, Safari 16+); if it's unsupported the fallback is exactly today's behavior (the scrollbar reappears; nothing else regresses).