Fix End Date/Time overlapping Start Date/Time on submission forms [#310]#311
Merged
Merged
Conversation
The Start/End time dropdowns added in #300 inherit the global `.mayo-form-field select { width: 100% }` rule. The Hour/Minute selects survive it via `flex: 1; min-width: 0` (flex-basis 0% overrides width), but the AM/PM select uses `flex: 0 0 auto`, so its flex-basis falls back to the 100% width and, being non-shrinkable, overflows its column and overlaps the neighbouring Start/End Date/Time field. Add `width: auto` to `.mayo-time-inputs select` so the shipped 100% width no longer forces the AM/PM select to fill the flex container. CSS-only; fixes both the event and announcement submission forms. 🐦⬛ Generated with Claude Code, orchestrated by Crow Co-Authored-By: Claude <noreply@anthropic.com> Crow-Session: 68239712-69AB-4E49-A896-D58AF3985DC1 Claude-Session: https://claude.ai/code/session_01QoNs9nVtYEEwhvFw3PV9eF
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.
Closes #310
Problem
After #300 (PR #305) replaced the native
<input type="time">on the event and announcement submission forms with Hour/Minute/AM-PM<select>dropdowns, the End Date/Time field visually overlapped the Start Date/Time field (reported on 1.9.2-beta1).Root cause
The two date/time fields sit side-by-side in
.mayo-datetime-group. The shipped global rule.mayo-form-field select { width: 100% }applies to the new time<select>s:.mayo-time-inputs select { flex: 1; min-width: 0 }givesflex-basis: 0%, which overrideswidthfor flex sizing..mayo-time-inputs .mayo-time-ampm { flex: 0 0 auto }wins on specificity, soflex-basis: autofalls back towidth: 100%. Being non-shrinkable (flex-shrink: 0), it becomes rigidly 100% of its container and overflows the column, spilling onto the adjacent field.Fix
Add
width: autoto.mayo-time-inputs selectso the shippedwidth: 100%no longer forces the AM/PM select to fill/overflow the flex container. CSS-only (public.cssis enqueued directly — no JS rebuild), and both the event and announcement forms share this structure so both are fixed.Testing
[mayo_event_form]/[mayo_announcement_form]at ~615px (matching the report): Start and End columns now sit side-by-side with no overlap; AM/PM sits inline after Minute within its own column.time_format="24hour", no AM/PM select) and the ≤600px stacked layout both unchanged.HH:mm(layout-only change).