fix(events): t-paliad-255 — kill /events horizontal scroll on mobile
A native <select> sizes itself to the widest <option> text. With long project titles in the matters filter, the select grew wider than the viewport and the /events page scrolled horizontally on mobile. The existing 480px media query forced .entity-select to width:100% on phones, but the 481-1000px range (tablet portrait + landscape phones) had no constraint at all and inherited the intrinsic select width. Fix: cap .filter-group and .entity-select at max-width:100% with min-width:0 so the cell can shrink to fit its flex container at every viewport. Desktop layout is preserved — normal-length options still sit in one row across the page; only pathological content (a single title wider than the row) wraps onto its own line. Approach: A — let the trigger respect its container at every width. Verified: zero horizontal scroll at 320 / 375 / 414 / 768 px with a realistic 130-character project title injected into the matters selector. Desktop (1280px) keeps all four filter-groups in one row.
This commit is contained in:
@@ -6545,12 +6545,18 @@ dialog.modal::backdrop {
|
|||||||
|
|
||||||
/* Each filter is a label-above-control cell so the caption sits on top of
|
/* Each filter is a label-above-control cell so the caption sits on top of
|
||||||
its select / button. The whole filter-row stays a horizontal flex-wrap
|
its select / button. The whole filter-row stays a horizontal flex-wrap
|
||||||
of these column-cells (t-paliad-117). */
|
of these column-cells (t-paliad-117).
|
||||||
|
|
||||||
|
min-width: 0 + max-width: 100% lets the cell shrink to fit its flex
|
||||||
|
container and prevents a native <select> with long option text from
|
||||||
|
blowing the cell wider than the viewport (t-paliad-255). */
|
||||||
.filter-group {
|
.filter-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
|
min-width: 0;
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-label {
|
.filter-label {
|
||||||
@@ -6564,6 +6570,10 @@ dialog.modal::backdrop {
|
|||||||
.filter-group .entity-select { width: 100%; }
|
.filter-group .entity-select { width: 100%; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* max-width: 100% caps the intrinsic width of a native <select> at its
|
||||||
|
parent — without it, browsers size the select to the longest <option>
|
||||||
|
text and a very long project title overflows the viewport on tablet
|
||||||
|
widths above the 480px breakpoint (t-paliad-255). */
|
||||||
.entity-select {
|
.entity-select {
|
||||||
padding: 0.4rem 0.75rem;
|
padding: 0.4rem 0.75rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
@@ -6572,6 +6582,8 @@ dialog.modal::backdrop {
|
|||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
max-width: 100%;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity-select:focus {
|
.entity-select:focus {
|
||||||
|
|||||||
Reference in New Issue
Block a user