too. Blocking it stacked those three onto three lines
* (reported). Only the LABELLED control groups want stacking; the pager is a row. */
body[data-page="admin-system-package-manager"] #view .controls > div:not(.pager) { display: block !important; min-width: 0; margin-bottom: var(--fs-space-2); }
/* …and the pager itself: a centred row that stays one. `.text` is the only part that may
* give way, so the two buttons keep their size instead of being squeezed. */
body[data-page="admin-system-package-manager"] #view .controls > .pager {
display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: var(--fs-space-2);
}
body[data-page="admin-system-package-manager"] #view .controls > .pager > .btn { flex: 0 0 auto; }
body[data-page="admin-system-package-manager"] #view .controls > .pager > .text { flex: 0 1 auto; min-width: 0; }
/* the bar's ::after value ("63% used …") normally floats above the bar, but the "Disk
* space:" label already sits there — on a phone the long value text overlapped label +
* bar. Drop it BELOW. The bar is a fixed 10px box, so a static ::after cannot push the
* next control: reserve space with margin-bottom and place the value absolutely in it.
* The disk section is the only `label` immediately followed by a `.cbi-progressbar`. */
body[data-page="admin-system-package-manager"] #view label + .cbi-progressbar {
width: 100%; margin-bottom: 3em;
}
body[data-page="admin-system-package-manager"] #view label + .cbi-progressbar::after {
top: calc(100% + 5px); inset-inline: 0 auto; bottom: auto;
text-align: start; white-space: normal; max-width: 100%;
}
/* `> div > label` — the group's TITLE label ("Filter:", "Actions:", "Display LuCI
* translation packages:"), not every label on the page. Written as plain `.controls label`
* it also blocked the three radio labels nested a level deeper, and `filtered / all / none`
* came out one per line. They are a set of three short choices: they belong on one row. */
body[data-page="admin-system-package-manager"] #view .controls > div > label { display: block; min-width: 0; white-space: normal; margin-bottom: var(--fs-space-1); }
/* …and the row they sit in. Stock separates them with text nodes, which is enough to
* keep them apart but not to keep them from splitting mid-choice — a flex row with a real
* gap wraps between labels instead of inside one. */
body[data-page="admin-system-package-manager"] #view .controls > div > div:has(> label > input[type="radio"]) {
display: flex; flex-wrap: wrap; align-items: center; gap: var(--fs-space-1) var(--fs-space-5);
}
body[data-page="admin-system-package-manager"] #view .controls .control-group { display: flex; flex-wrap: wrap; min-width: 0; gap: var(--fs-space-2); }
body[data-page="admin-system-package-manager"] #view .controls .control-group input { flex: 1 1 140px; min-width: 0; max-width: 100%; }
/* The Diagnostics stack is not here: a page name and a viewport are neither of the facts that
* matter. Any app can put a field, a select and a button in one header-less
* `
`, and what decides whether that row fits is the ROOM — at 320px the
* row needs 338px, and inside a narrow panel at 900px of viewport it needs the same.
* fs-select.js writes `.fs-rowstack` on any such table that overflows, at any width, and
* theme/30-tables.css carries the declarations. */
/* No `table.fs-dt { display: block; width: 100% }` here — it sat here to stop a data table
* that still fitted as a table from exceeding its column, and its absence is what makes the
* measured design work at phone widths at all: `display: block` on a
DISCARDS the
* table formatting
* context, so the rows are wrapped in an anonymous table sized to the block and the table can
* never be wider than its parent — which means it can never overflow, which means
* `fit.overflows()` can never see anything below 767px. Measured on Processes at 720px with
* such a rule in place: the Command column sat at 126px against a widest token of 353px, and
* forcing that column's `overflow-wrap` three different ways produced the same 126px and the
* same "the table fits" every time. */
/* generic caps: an input/select must never exceed its field, and long key/value strings
* in the Overview cards must break. */
.cbi-value-field input, .cbi-value-field select, .cbi-value-field .cbi-dropdown { max-width: 100%; }
/* …and once the label is on its own line the control takes the line it was given — a
* field sized to its content left half the row empty and made the form read as a ragged
* column (stock does the same on a phone). checkbox/radio/file keep their intrinsic size:
* a full-width checkbox is a hit target the size of the screen. */
.cbi-value-field select,
.cbi-value-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.cbi-value-field .cbi-dropdown:not(.btn):not(.cbi-button),
.cbi-value-field .cbi-dynlist,
.cbi-value-field .cbi-select { width: 100%; }
/* min-width only: breaking a long value is base/40-tables.css's default for every cell now,
* and this copy moved nothing when switched off against 126 matching cells. `min-width: 0` is
* NOT redundant — switching that off moved 12 — so it stays. */
#view .fs-ovl .table .td, #view .fs-ovl .table .th { min-width: 0; }
/* Stack each field: label on its own line, control and description full-width below. Side by side
* on the desktop squeezes the field — and any .cbi-value-description inside it — into a
* ~120px column on a phone, so one sentence of help wraps to 8 lines. The row already
* flex-wraps; these two full-width children are what stack it.
*
* Not scoped to #view, and that is the point: ui.js appends a modal to , so an
* `#view .cbi-value` rule leaves every DIALOG in the desktop layout and on a phone the
* Edit-interface form pushes its inputs past the dialog's right edge. */
/* `start` undoes base's `text-align: end` (the label hugs its field when the two share a
* row); stacked, it goes back to the reading edge. Logical for the same reason base's is. */
.cbi-value > .cbi-value-title { flex: 1 1 100%; text-align: start; padding-top: 0; }
.cbi-value > .cbi-value-field { flex: 1 1 100%; min-width: 0; }
/* The stock phone contract every luci-app-* is written against. These classes are emitted by
* LuCI's own JS and by third-party apps that copied them, and they are styled nowhere but
* bootstrap's mobile.css — so a theme that ignores them renders a phone layout its own app JS
* believes it has already handled. */
/* A column the emitting JS asks to DROP on a phone: the wireless Associated Stations table marks
* its MAC column .hide-xs, and stock LuCI shows Network/Host/Signal/Rate and no MAC.
*
* The `.table .td.hide-xs` half is not redundant: the stacking rules select the cell as
* `table.fs-dt .td` (0,2,1) and `.cbi-section-table .td` (0,2,0), both outranking a bare
* `.hide-xs` (0,1,0), so the cell keeps their
* `display: block` and stays visible. Stock LuCI wins this with !important; one class more
* wins it without one. */
.hide-sm, .hide-xs,
.table .td.hide-sm, .table .td.hide-xs,
.table .th.hide-sm, .table .th.hide-xs { display: none; }
/* The `.col-N` weights used to live here, inside the phone tier. They are UNGUARDED now,
* in theme/30-tables.css: `flex` is inert on anything that is not a flex item, and a `.td`
* becomes one exactly when its table cards — so one copy covers the phone tier, the
* measured stack at any width and the config table's @container, with no second copy to
* keep in step. See the block there. */
/* iOS Safari zooms the page in when a focused control's text is under 16px and never zooms
* back out — the theme's 13px inputs did that on every form. Stock LuCI needs !important
* for it; here the theme layer is enough. */
input, textarea, select, .cbi-dropdown > ul > li { font-size: var(--fs-type-lg); }
}
/* Dropdown list: anchored to its widget, never full-bleed.
*
* ui.js has a touch branch (`'ontouchstart' in window`) that stretches the open list across the
* viewport with INLINE offsets — `ul.style.left = ${-rect.left}px`, `ul.style.right =
* ${rect.right - vpWidth}px` — which assume the list's containing block is the
* viewport. It is not: .cbi-dropdown is position: relative, so a negative `left` drags the list
* off to the side and clips the labels. An author !important is the only thing that outranks an
* inline declaration, so pin it back under the widget. Harmless on desktop, where ui.js sets
* only top/bottom/max-height.
*
* Only left/right carry the flag — those are the two properties ui.js writes inline. The widths
* never appear in an inline style (ui.js only CLEARS `ul.style.width`, on close), so they win
* from this layer on their own. */
.cbi-dropdown[open] > ul.dropdown {
inset-inline-start: 0 !important;
inset-inline-end: auto !important;
min-width: 100%;
width: max-content;
max-width: min(92vw, 420px);
}
}