Skip to content

fix(site): stop the hero buttons stacking flush on a phone - #21

Merged
shenxianpeng merged 1 commit into
mainfrom
claude/fix-hero-buttons
Sep 1, 2026
Merged

fix(site): stop the hero buttons stacking flush on a phone#21
shenxianpeng merged 1 commit into
mainfrom
claude/fix-hero-buttons

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Reported from a phone: the two hero calls to action render as one broken box rather than two buttons.

Cause

They are inline-block anchors 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 GitHub call 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:

Viewport Before After
390px stacked, gap 0px, widths 212/252 stacked, gap 16px, widths 336/336
1280px side by side, no gap 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; 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 with mkdocs build --strict.

One note for anyone building locally: mkdocs build fetches Google Fonts for the social-cards plugin. SOCIAL_CARDS=false mkdocs build --strict skips it — the same switch netlify.toml already uses for deploy previews. No configuration was changed here.


Generated by Claude Code

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
@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 0460991
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a965e4ff16be10008a5d603
😎 Deploy Preview https://deploy-preview-21--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 98a4c851-708a-4589-b91f-478a0038cdd9

📥 Commits

Reviewing files that changed from the base of the PR and between bd15226 and 0460991.

📒 Files selected for processing (2)
  • docs/overrides/home.html
  • docs/stylesheets/extra.css

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shenxianpeng
shenxianpeng merged commit 3ea4e5f into main Sep 1, 2026
8 checks passed
@shenxianpeng
shenxianpeng deleted the claude/fix-hero-buttons branch September 1, 2026 05:15
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.

2 participants