Skip to content

fix: stop the GitHub ribbon covering the theme toggle - #221

Merged
magnus-madsen merged 1 commit into
masterfrom
fix-github-ribbon-overlap
Aug 9, 2026
Merged

fix: stop the GitHub ribbon covering the theme toggle#221
magnus-madsen merged 1 commit into
masterfrom
fix-github-ribbon-overlap

Conversation

@magnus-madsen

Copy link
Copy Markdown
Member

The "Fork me on GitHub" ribbon is 149px wide and pinned to the top-right of the viewport at z-index: 9999 — the same corner the navbar ends in. It was shown from lg up.

It only clears the theme toggle once the margin beside the page card, (viewport - container) / 2, exceeds the ribbon's 149px less the 28px of navbar and container padding the toggle already sits inside: 121px, so from viewport = container + 242px. Against the 1140px the container is capped at, that is 1382px.

Below that the ribbon sat on top of the toggle — and since the whole 149px square is inside the <a>, it took the clicks meant for it, so the toggle was unreachable on an ordinary 1280 or 1366 laptop. Below 1200px, where the container drops to 960px, it reached "Internships" as well.

d-none d-xxl-block is the first breakpoint past the threshold, clearing it by 9px — and by more from there on, since the 1140px cap in global.css stops the container growing to meet it. That dependency is noted in the comment above the ribbon.

Not addressed here: between 992px and 1199px the nav row needs ~1030px against a 960px container, so "Get Started" still wraps to two lines. Separate change.

🤖 Generated with Claude Code

The ribbon is 149px wide and pinned to the top-right of the viewport at
z-index 9999, which is also where the navbar ends. It was shown from lg
up, but it only clears the theme toggle once the margin beside the page
card exceeds 149px less the 28px of padding the toggle already sits
inside -- from a viewport of container + 242px, or 1382px against the
1140px container. Below that the whole 149px square, all of it inside
the link, sat on top of the toggle and took its clicks; below 1200px it
reached Internships as well.

Showing it from xxl instead is the first breakpoint past that threshold.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@magnus-madsen
magnus-madsen merged commit 980aca7 into master Aug 9, 2026
2 checks passed
@magnus-madsen
magnus-madsen deleted the fix-github-ribbon-overlap branch August 9, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant