@layer theme { /* base/60-modal.css draws the dialog's elevation in --fs-panel2, which in footstrap light is the * same hex as --fs-bg: the shadow under the top of the z-stack drawn in the exact colour of the * page behind it (1.00:1 light, 1.27 dark — a glow, never a shadow, panel2 being lighter than * the canvas). Every other floating surface in the theme takes --fs-shadow-pop. Unscoped * `.modal`, not `#modal_overlay .modal`: .modal is reachable outside the overlay, and the layer * beats base at equal specificity. */ .modal { box-shadow: var(--fs-shadow-pop); } /* The uci-changes diff takes its tints from the ladder in base (--fs-*-fill for the block, * --fs-*-line for its border) and nowhere else — a second set here paints the same widget at two * strengths depending on whether it is inside the modal, which it always is. Only geometry is * left here: small rounding on the diff boxes and legend swatches. * * The popup's own radius is not restated: base rounds a modal to `var(--fs-radius-lg)` with a * comment saying a modal is a card. */ /* moved from base with the heading ramp (45-misc.css): the `line-height: normal` here beat * the ramp's tight leading in-layer for a dialog's h4 title, and left behind it would lose * to the ramp by layer (measured: modal headings dropped normal -> 15.6px) */ .modal > * { line-height: normal; margin-bottom: .5em; max-width: 100%; } /* an alert dropped into a dialog keeps the alert's own rhythm. In base this resolved by * FILE ORDER (90-widgets after 60-modal, both 0,1,0) — here it wins on specificity, so the * cascade no longer rests on position. */ .modal > .alert-message { margin-bottom: var(--fs-space-2); } /* moved from base with the generic field box in theme/60-inputs.css: a dialog's log/output * textarea fills the dialog, and base's width:100% would lose to the 210px box by layer */ .modal > pre, .modal > textarea { white-space: pre-wrap; overflow: auto; width: 100%; } /* A config-form modal (Bridge device options, firewall rule …) is only 600px wide by * default — cramped for a form with a table (Bridge VLAN filtering, whose .cbi-map container * then falls under the 992px card threshold and cards even on a big screen). Fluid via vw: * widens toward 1100 on desktop (the container clears 992 and tables stay tables), stays * narrow (cards) on tablet/phone. */ .modal:has(.cbi-map) { max-width: min(1100px, 94vw); } /* A modal must never gain a HORIZONTAL scroll: #modal_overlay is the scroll container * (base/60-modal.css, `overflow: auto`) and the dialog is centred in it with `margin: auto`, so * one over-wide child scrolls the modal's own * left edge off the screen — the dialog still there, just unreachable-looking. Measured at * 360px: the overlay wanted 634px of scroll against 530px of room. * * Two children do it, both stock LuCI markup: * - `