fix(homepage): prevent "Open Community Working Meetings" button text overflow on mobile/ipad#2437
Open
ikshantshukla123 wants to merge 1 commit into
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:
|
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.
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