fix(site): stop the hero buttons stacking flush on a phone - #21
Merged
Conversation
The two calls to action were inline-blocks in a paragraph, so nothing
separated them. On a viewport too narrow to hold both on one line they
wrapped into a column with a measured gap of exactly 0px, and since
each is only as wide as its own label — 212px against 252px — and the
hero style squares off their corners, the pair read as one broken box
rather than two buttons.
The row is now a centred flex container with a gap, and once it stacks
the buttons share a width, because a column of two different widths
still looks like a mistake.
Measured in Chromium against the built site, before and after:
390px before stacked, gap 0px, widths 212/252
390px after stacked, gap 16px, widths 336/336
1280px after side by side, gap 16px, widths unchanged
Checked at 320, 360, 390, 430, 500, 560, 768 and 1280px: the switch
happens at 512px, and both sides of it are deliberate. Desktop keeps
the layout it had, minus the missing gap.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
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 |
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.
Reported from a phone: the two hero calls to action render as one broken box rather than two buttons.
Cause
They are
inline-blockanchors inside a paragraph, so nothing separates them. On a viewport too narrow to hold both on one line they wrap into a column with a measured gap of exactly 0px. Each is only as wide as its own label — 212px against 252px — and the hero style squares off their corners, so the pair lands as two mismatched rectangles touching edge to edge.Fix
The row is now a centred flex container with a gap. Once it stacks, the buttons share a width — a column of two different widths still looks like a mistake.
The
Star on GitHubcall to action stays. It was added deliberately in #16, and this is a layout bug rather than a reason to drop it.Measured, not eyeballed
Chromium against the built site, before and after:
Checked at 320, 360, 390, 430, 500, 560, 768 and 1280px. The switch happens at 512px and both sides of it are deliberate; there is no width where the buttons wrap without also being equalised. Desktop keeps the layout it had, minus the missing gap.
Verification
pytest tests/ -q→ 9 passed, and the site builds withmkdocs build --strict.One note for anyone building locally:
mkdocs buildfetches Google Fonts for the social-cards plugin.SOCIAL_CARDS=false mkdocs build --strictskips it — the same switchnetlify.tomlalready uses for deploy previews. No configuration was changed here.Generated by Claude Code