Pull pipeline/ from boilerplate: the phone schedule table no longer overflows
Refreshes pipeline/ with boilerplate's fix for the schedule table on a
phone (grid-template-columns squeezing name/cadence to a sliver at
375px, plus a content-box input overlapping the next column). Verified
on /settings/pulls at 375px: no overflow anywhere in the element or
the page. Removes the desk-schedules { overflow-x: auto } workaround
and its comment from app/static/app.css now that nothing overflows it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
da1a62577a
commit
36860f0cfe
2 files changed
+26
-20
No files matched your search
@@ -128,17 +128,24 @@ button[disabled] { opacity: .4; cursor: default; }
|
||||
input[type="checkbox"] { width: 1.4rem; height: 1.4rem; }
|
||||
}
|
||||
|
||||
/* A phone: seven columns do not fit in 375 pixels, so each row folds to two
|
||||
* lines instead -- name, kind and the switch on top, cadence, next, last and
|
||||
* the actions underneath -- and the header goes, since there is nothing left
|
||||
* to label. */
|
||||
/* A phone: seven columns do not fit in 375 pixels, so each row folds to
|
||||
* three lines instead -- name, kind and the switch on top, cadence, next
|
||||
* and last in the middle, the two buttons across the bottom -- and the
|
||||
* header goes, since there is nothing left to label.
|
||||
*
|
||||
* The middle and last columns are sized with minmax(0, ...) rather than
|
||||
* auto: auto sizes a track to its content's natural, unwrapped width, which
|
||||
* for a nowrap cell is the whole string -- so a long kind or timestamp
|
||||
* pushed the name column down to nothing. minmax(0, ...) caps how wide a
|
||||
* track may grow but still lets it shrink to fit, and each of those cells
|
||||
* gets its own ellipsis instead. */
|
||||
@media (max-width: 40rem) {
|
||||
.panel { padding: 0; }
|
||||
table, tbody { display: block; }
|
||||
thead { display: none; }
|
||||
tr {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto auto auto;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 6rem) minmax(0, 5rem);
|
||||
column-gap: 8px;
|
||||
row-gap: 2px;
|
||||
align-items: center;
|
||||
@@ -148,19 +155,23 @@ button[disabled] { opacity: .4; cursor: default; }
|
||||
tr:last-child { border-bottom: 0; }
|
||||
td, th { display: block; padding: 0; border: 0; min-width: 0; }
|
||||
td:empty { display: none; }
|
||||
td.name { grid-column: 1; grid-row: 1; font-size: 14px; }
|
||||
td.kind { grid-column: 2 / 4; grid-row: 1; }
|
||||
td.on { grid-column: 4; grid-row: 1; justify-self: end; }
|
||||
td.name { grid-column: 1; grid-row: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
td.kind { grid-column: 2; grid-row: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
td.on { grid-column: 3; grid-row: 1; justify-self: end; }
|
||||
td.cadence { grid-column: 1; grid-row: 2; }
|
||||
td.next { grid-column: 2; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
td.last { grid-column: 3; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
td.actions {
|
||||
grid-column: 4; grid-row: 2; justify-self: end;
|
||||
grid-column: 1 / -1; grid-row: 3; justify-self: end;
|
||||
display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px;
|
||||
}
|
||||
td.actions button { margin: 0; }
|
||||
/* A box that looks like text until hovered has nothing to hover with. */
|
||||
input.cadence { border-color: color-mix(in srgb, var(--desk-jobs-fg) 20%, transparent); min-width: 0; width: 100%; }
|
||||
/* A box that looks like text until hovered has nothing to hover with.
|
||||
* box-sizing: border-box, because the base rule's padding and border are
|
||||
* content-box -- width: 100% of a border-box cell plus that padding and
|
||||
* border is wider than the cell, which is exactly the sliver this media
|
||||
* query exists to not reintroduce. */
|
||||
input.cadence { border-color: color-mix(in srgb, var(--desk-jobs-fg) 20%, transparent); min-width: 0; width: 100%; box-sizing: border-box; }
|
||||
/* The add row: label over field, each field the width of the card. */
|
||||
tr.adder { grid-template-columns: 1fr; }
|
||||
tr.adder td { grid-column: 1; }
|
||||
@@ -171,7 +182,10 @@ button[disabled] { opacity: .4; cursor: default; }
|
||||
color: var(--desk-jobs-dim);
|
||||
font-weight: 600;
|
||||
}
|
||||
tr.adder input, tr.adder select { width: 100%; min-width: 0; border-color: color-mix(in srgb, var(--desk-jobs-fg) 20%, transparent); }
|
||||
tr.adder input, tr.adder select {
|
||||
width: 100%; min-width: 0; box-sizing: border-box;
|
||||
border-color: color-mix(in srgb, var(--desk-jobs-fg) 20%, transparent);
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
Reference in new issue
Block a user