fix(homepage): prevent "Open Community Working Meetings" button text overflow on mobile/ipad - #2437
Conversation
The 'Open Community Working Meetings' button used a fixed h-[40px] with no horizontal padding, so on narrow viewports the wrapped label overflowed the button and touched its borders. Size the button by its content instead (w-fit, min-h-[40px], px-4 py-2) so it renders identically on desktop and grows gracefully when the text wraps. Fixes json-schema-org#2436
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2437 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 31
Lines 695 695
Branches 215 215
=========================================
Hits 695 695 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vtushar06
left a comment
There was a problem hiding this comment.
Thanks for the fix, one thing I would like to mention can you please wait until a issues passes triage, and there is one more fix switch to iphone 12 and see text on hero page it is there on boundary so please correct that.
And rest done from my side.
On small viewports (e.g. iPhone 12, 390px) the hero subtitle text touched the viewport edges. Add px-4 on mobile only; md+ unchanged.
Thanks for the review! Both points addressed: Understood on triage I'll wait for issues
|
vtushar06
left a comment
There was a problem hiding this comment.
LGTM 🚀 @ikshantshukla123, Thanks
|
Congratulations, @ikshantshukla123 for your first pull request merge in this repository! 🎉🎉. Thanks for your contribution to JSON Schema! |

What kind of change does this PR introduce?
Bugfix (CSS-only, one line)
Issue Number:
Screenshots/videos:

Before:
After:

Before:

After:

If relevant, did you update the documentation?
Not applicable — no documentation changes needed.
Summary
On mobile viewports, the "Open Community Working Meetings" button on the
homepage broke: its label wrapped to two lines, overflowing the fixed
h-[40px]height, and with no horizontal padding the text touched thebutton borders.
This PR sizes the button by its content instead of hardcoding dimensions:
h-[40px]→min-h-[40px]— desktop still renders at exactly 40px,but the button can grow when the label wraps
px-4 py-2— the text keeps breathing room at every widthmax-w-[300px] w-full→w-fit max-w-full— the button shrink-wrapsto its label plus padding (the same sizing model already used by the
equivalent button on the Community page, which does not have this bug)
The sibling "Office Hours" button is unaffected (its short label never
wraps), so it was intentionally left untouched to keep the diff minimal.
All Cypress specs pass (
yarn cypress:run:all, 294/294).Does this PR introduce a breaking change?
No.
Checklist