update 2026-09-20 01:22:33

This commit is contained in:
action committed 2026-09-20 01:22:33 +08:00
1 parent 42e0cfbec4
commit deb27aee9d
864 files changed
+180566 -42

No files matched your search

@@ -0,0 +1,84 @@
.label {
@apply bg-surface-sunken text-text rounded-full px-3 py-1 text-xs font-bold uppercase;
&.important {
@apply bg-info-surface text-info;
}
&.warning {
@apply bg-danger-surface text-danger;
}
&.success {
@apply bg-success-surface text-success;
}
&.notice {
@apply bg-warning-surface text-warning;
}
}
.zonebadge {
@apply border-hairline bg-surface-sunken text-text inline-flex items-center gap-1.5 overflow-visible rounded-lg border px-2 py-1 align-middle text-sm leading-normal font-semibold max-md:gap-1 max-md:px-1.5 max-md:text-xs;
&[style*="--zone-color-rgb"] {
@apply border-transparent bg-[rgb(var(--zone-color-rgb),.7)]!;
& em {
@apply text-text;
}
}
&.zonebadge-empty {
@apply text-text-muted border-dashed bg-transparent font-normal italic;
}
/* Bare zone-colour swatch: the interface overview / tooltip renders a
label-less `.zonebadge` as a colour chip prefixing an `.ifacebadge`. The
tag redesign's horizontal padding is meant for text labels, so keep the
label-less swatch a compact pill instead of a wide block. */
.ifacebadge > & {
@apply rounded-full px-1 py-0.5;
}
.cbi-dropdown & {
@apply px-1.5 py-0.5;
}
}
.ifacebadge {
@apply border-hairline bg-surface-sunken text-text hover:border-hairline hover:bg-surface-sunken inline-flex cursor-default flex-nowrap items-center gap-2 rounded-2xl border px-3 py-2 text-sm font-normal shadow-sm transition-[box-shadow,border-color,background-color] duration-150 hover:shadow-md max-md:gap-1.5 max-md:px-2.5 max-md:py-1.5 max-md:text-xs;
.zonebadge > & {
@apply rounded-2xl px-1.5 py-0;
& img {
@apply mr-1 w-4;
}
}
.cbi-dropdown & {
@apply gap-1 rounded-lg px-1.5 py-0.5 shadow-none hover:shadow-none;
& img {
@apply mr-1 w-4;
}
}
& > img,
& > .cbi-tooltip-container > img {
@apply w-5 shrink-0 self-center max-md:w-4;
}
& > span {
& > .nowrap {
@apply mb-1.5 inline-block text-sm max-md:text-xs;
}
}
&.ifacebadge-active {
@apply border-brand font-semibold;
}
&.large {
@apply min-w-[200px] flex-1 px-4 py-3 max-md:min-w-[180px] max-md:px-3 max-md:py-2.5;
}
}
@@ -0,0 +1,53 @@
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
.cbi-button {
/* transform stays in this list for the .cbi-button active:scale-95
variant in _form.css, which relies on this base transition. */
@apply inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-xl border px-3 py-1.5 text-sm font-medium antialiased transition-[background-color,border-color,transform] duration-150 max-md:text-base max-md:font-medium;
&[disabled] {
@apply cursor-not-allowed opacity-(--app-opacity-disabled);
}
.td & {
@apply inline-flex w-auto flex-none whitespace-nowrap max-md:min-h-9 max-md:text-sm;
}
}
.btn,
.cbi-button,
.cbi-button-default,
.cbi-button-download,
.cbi-button-find,
.cbi-button-link,
.cbi-button-up,
.cbi-button-down {
@apply border-hairline bg-surface-sunken text-text hover:bg-hover-faint;
}
.drag-handle {
@apply border-hairline bg-surface-sunken text-text-muted hover:bg-hover-faint;
}
.btn.primary,
.cbi-button-action,
.cbi-button-apply,
.cbi-button-reload,
.cbi-button-add,
.cbi-button-edit {
@apply border-brand bg-brand hover:bg-brand-hover text-on-brand;
}
.cbi-button-positive,
.cbi-button-fieldadd,
.cbi-button-save {
@apply border-transparent bg-brand-subtle text-brand hover:bg-brand-subtle-hover;
}
.cbi-button-negative,
.cbi-section-remove .cbi-button,
.cbi-button-reset,
.cbi-button-remove {
@apply border-transparent bg-danger-surface text-danger hover:bg-danger-surface-hover;
}
@@ -0,0 +1,207 @@
.cbi-section {
@apply mb-3 overflow-visible rounded-2xl p-5 max-md:p-3;
&[data-tab-title] {
@apply m-0 p-0;
}
&[data-tab-active="true"] {
@apply mb-3 p-5 max-md:p-3;
}
#maincontent & {
@apply bg-surface border-hairline border shadow-sm;
}
& > .cbi-title {
@apply flex items-start justify-between;
& > h3 {
@apply flex-1;
& .label[data-clickable] {
@apply text-text bg-surface-sunken;
@apply inline-flex size-7 cursor-pointer items-center justify-center p-0 hover:shadow-md active:scale-95 max-md:size-6;
&::before {
@apply size-4 bg-current transition-transform duration-150 content-[''];
}
}
& span[data-indicator="poll-status"] {
@apply relative size-5 cursor-pointer text-[0px];
&::before {
@apply absolute size-5 bg-current transition-transform duration-150 ease-out content-[''];
}
@variant hover {
&::before {
@apply scale-110;
}
}
&:active::before {
@apply scale-95;
}
&[data-style="active"] {
&::before {
@apply rotate-0 [mask:var(--icon-arrow-right)_center/cover_no-repeat];
}
}
&[data-style="inactive"] {
&::before {
@apply rotate-90 [mask:var(--icon-arrow-right)_center/cover_no-repeat];
}
}
}
}
}
legend {
@apply text-lg font-semibold;
}
& h3 {
@apply text-text border-hairline border-b pb-4 max-md:mx-0 max-md:pb-2;
}
& div[style*="display:grid"] {
@apply max-md:grid-cols-2! max-md:gap-3;
&:has(> .ifacebox) {
@apply place-items-center;
}
}
& .network-status-table {
@apply mb-3 flex flex-nowrap justify-around gap-4 max-md:flex-col;
}
& .cbi-section-create {
@apply mt-6 flex flex-wrap items-center gap-3 max-md:mx-0 max-md:mt-5 max-md:flex-col max-md:items-stretch max-md:gap-3;
& > div {
@apply flex-none max-md:w-full max-md:flex-1;
}
}
}
.ifacebox {
@apply border-hairline bg-surface-overlay hover:border-hairline max-md:border-hairline relative inline-flex min-w-28 flex-col items-stretch overflow-visible rounded-2xl border text-center text-base leading-5 shadow-md hover:shadow-xl max-md:min-w-30 max-md:flex-1 max-md:rounded-3xl max-md:shadow-sm;
#cbi-network-interface & {
@apply max-md:flex-row md:min-w-38;
}
& .ifacebox-head {
@apply border-hairline bg-surface-sunken text-text w-full rounded-t-2xl border-b px-4 py-3 text-center font-semibold tracking-tight transition-[background-color,border-color,color] duration-150 max-md:rounded-t-3xl max-md:px-3 max-md:py-2.5 max-md:text-sm max-md:leading-5 max-md:font-medium;
&[style*="--zone-color-rgb"] {
@apply bg-[rgb(var(--zone-color-rgb),.75)]!;
}
#cbi-network-interface & {
@apply max-md:flex max-md:w-auto max-md:shrink-0 max-md:items-center max-md:justify-center max-md:rounded-l-3xl max-md:rounded-tr-none max-md:border-r max-md:border-b-0;
}
&.cbi-tooltip-container {
@apply static bg-transparent;
& .cbi-tooltip {
@apply bottom-0 left-0;
}
}
&.active {
@apply border-brand bg-brand text-on-brand;
}
}
& .ifacebox-body {
/* Flex column base: `items-stretch` lets label/value rows span full width
(e.g. luci-app-modemdata) while `justify-center` keeps rows tight together
and balanced instead of spread apart. Icon-only cards (switch ports, the
interfaces list) centre horizontally via `text-center`/`mx-auto`. The
interfaces overview layers its richer layout under `.network-status-table`. */
@apply text-text flex w-full flex-1 flex-col items-stretch justify-center gap-1 rounded-b-2xl p-3 text-center max-md:rounded-b-3xl;
#cbi-network-interface & {
@apply max-md:flex-row max-md:items-center max-md:rounded-r-3xl max-md:rounded-bl-none max-md:py-2 max-md:pr-2 max-md:pl-4;
}
& > img {
@apply mx-auto w-5;
}
& > span {
@apply text-text space-y-1.5 max-md:space-y-1 max-md:text-sm max-md:leading-5;
.network-status-table & {
@apply w-full;
}
.cbi-tooltip-container + .cbi-tooltip-container {
@apply ml-1;
}
.cbi-tooltip {
@apply delay-200;
}
& .nowrap {
@apply inline-block;
}
& > .nowrap {
@apply not-last:mb-1;
}
& img {
@apply w-5 shrink-0;
}
}
& > div {
@apply block w-full space-y-0;
#cbi-network-interface & {
@apply max-md:w-auto max-md:flex-1 max-md:space-y-1;
}
}
& .cbi-tooltip-container {
@apply text-text static inline-flex cursor-help items-center justify-center;
& .cbi-tooltip {
@apply bottom-0 md:left-0;
& .nowrap {
@apply whitespace-nowrap;
}
}
}
& small {
@apply block text-xs leading-4;
#cbi-network-interface & {
@apply max-md:mt-0;
}
}
}
}
/*
Network interfaces overview (admin/network) — the page `.ifacebox` was designed
for. The rich equal-height card layout is scoped here (not on the base) so
third-party pages keep the plain, tolerant defaults above. Mirrors the
base-vs-`.network-status-table` split in luci-theme-bootstrap.
*/
.network-status-table .ifacebox-body {
@apply flex h-full flex-1 flex-col items-center justify-around gap-2;
& > div {
@apply flex flex-wrap gap-2 max-md:gap-1.5;
}
/* `flex-1` alone lets the badges shrink to min-content, so six SSIDs stay
crammed on one line instead of wrapping. The floor mirrors
luci-theme-bootstrap's `min-width: 220px` on the same badges. */
& .ifacebadge {
@apply min-w-55 flex-1;
}
}
@@ -0,0 +1,140 @@
.cbi-dropdown {
@apply inline-flex h-fit max-w-full min-w-fit shrink-0 items-center p-0 whitespace-nowrap shadow-sm;
&[disabled] {
@apply pointer-events-none opacity-(--app-opacity-disabled);
}
&:not(.btn):not(.cbi-button) {
@apply border-hairline bg-surface min-w-52.5 max-w-full rounded-2xl border md:max-w-100;
& > ul > li {
&[placeholder] {
@apply hidden;
}
}
}
& > ul {
@apply m-0 flex flex-1 list-none flex-nowrap items-center gap-0.5 overflow-hidden max-md:flex-wrap;
& > li {
@apply m-0 hidden list-none items-center gap-1 overflow-hidden px-2 py-1.5;
&[display] {
@apply !flex;
}
& .hide-open {
@apply block;
}
& .hide-close {
@apply hidden;
}
& > form {
@apply pointer-events-none hidden;
}
& > label {
@apply flex items-center gap-2;
}
& img {
@apply h-5 w-5 flex-none align-middle;
}
& span {
@apply truncate;
}
}
&.dropdown {
@apply border-hairline bg-surface-overlay absolute left-0 z-50 w-fit min-w-full overflow-y-auto rounded-lg border shadow-xl backdrop-blur-md backdrop-saturate-150;
& > li {
@apply text-text-muted hover:bg-brand-subtle min-h-9 w-full cursor-pointer px-3 py-1.5 font-medium;
}
}
&.preview {
@apply hidden;
}
}
&[empty] {
& > ul {
@apply max-h-px max-w-px;
& > li {
@apply block;
}
}
}
&[optional][open] > ul.dropdown > li[placeholder] {
@apply block;
}
&[open] {
@apply border-brand ring-focus-ring relative ring-2;
& > ul.dropdown {
@apply block w-auto max-w-none;
& > li {
@apply flex;
&[selected] {
@apply bg-brand-subtle text-brand;
}
&[unselectable] {
@apply opacity-(--app-opacity-disabled);
}
& .hide-open {
@apply hidden;
}
& .hide-close {
@apply block;
}
}
}
& > ul.preview {
@apply flex;
}
}
&[multiple] {
&[more],
&[empty] {
& > .more {
@apply flex flex-none shrink-0 px-2.5 py-1.5;
}
}
&[empty] > .more {
@apply flex-1;
}
&[open] {
& > ul.dropdown > li > form {
@apply flex items-center;
}
}
& > ul > li > label {
@apply flex;
}
}
& > .open {
@apply border-hairline flex flex-none shrink-0 cursor-pointer items-center justify-center border-l px-2.5 py-0.5 text-sm text-current;
}
& > .more {
@apply hidden;
}
}
@@ -0,0 +1,83 @@
.floating-toolbar {
/* Detached-bubble speed dial: every shortcut is its own floating circle
(elevation only, no border), collapsing drops the bubbles into the
toggle one after another and the toggle's X rotates into a +.
All motion is translate/scale/opacity/rotate — compositor-only (R1).
The stagger math runs on custom properties set by header.ut:
--fab-n (on .toolbar-list) item count
--fab-i (on each .toolbar-btn) index, 0 = top bubble
--fab-icon (on each .toolbar-btn) configured icon URL, drawn via
mask + bg-current so it follows the theme text color in both
modes (replaces the old <img> + dark:invert).
Travel per step = bubble 44px + 10px gap = 3.375rem (40px + 8px =
3rem below md). Expanding pops bottom-first ("jump up"), collapsing
drops top-first; --fab-d only ever delays the motion properties, so
hover color feedback stays instant. */
/* The stack keeps its layout height when collapsed (the bubbles must
travel a real distance into the toggle), so the container itself must
not catch clicks — only the buttons do. */
@apply pointer-events-none fixed right-4 bottom-4 z-40 flex flex-col items-center max-md:right-3 max-md:bottom-3;
.toolbar-list {
@apply mb-2.5 flex flex-col items-center gap-2.5 max-md:mb-2 max-md:gap-2;
}
.toolbar-btn {
@apply text-text-muted bg-surface-overlay pointer-events-auto grid size-11 cursor-pointer place-items-center rounded-full shadow-md max-md:size-10;
/* `visibility` rides the same transition so collapsed bubbles leave the
tab order, but only after the drop finishes (it flips at the end of
its transition window, so the motion itself is never clipped). */
@apply [transition:translate_320ms_cubic-bezier(0.34,1.25,0.5,1),scale_320ms_cubic-bezier(0.34,1.25,0.5,1),opacity_220ms_ease,visibility_320ms_ease,background-color_150ms_ease,color_150ms_ease];
@apply [transition-delay:var(--fab-d,0s),var(--fab-d,0s),var(--fab-d,0s),var(--fab-d,0s),0s,0s];
&:hover {
@apply text-text bg-hover-faint;
}
&:active {
@apply scale-[0.92];
}
&:not(.toggle) {
@apply [--fab-d:calc((var(--fab-n,1)-1-var(--fab-i,0))*60ms)] no-underline;
/* The stagger delay must not defer press feedback: `scale` shares the
delayed transition channel, so without this a press on the top
bubble would acknowledge (n-1)*60ms late. Nested (not merged into
the base `:active`) so it outranks the delay set just above. */
&:active {
@apply [--fab-d:0s];
}
.icon {
@apply size-5 shrink-0 bg-current [mask:var(--fab-icon)_center/contain_no-repeat] max-md:size-4.5;
}
}
&.toggle {
@apply text-text-subtle hover:text-text border-0;
.icon {
@apply grid size-5 place-items-center transition-[rotate] duration-[250ms] ease-out max-md:size-4.5;
svg {
@apply size-full;
}
}
}
}
&.collapsed {
.toolbar-btn {
&:not(.toggle) {
@apply pointer-events-none invisible scale-[0.35] opacity-0;
@apply [--fab-d:calc(var(--fab-i,0)*60ms)] translate-y-[calc((var(--fab-n,1)-var(--fab-i,0))*3.375rem)] max-md:translate-y-[calc((var(--fab-n,1)-var(--fab-i,0))*3rem)];
}
&.toggle .icon {
@apply rotate-45;
}
}
}
}
@@ -0,0 +1,82 @@
.cbi-input-invalid,
.cbi-value-error {
@apply !border-danger focus:!ring-danger;
}
.cbi-value {
@apply flex flex-row flex-wrap gap-6 py-1.5 max-md:flex-col max-md:gap-1.5 max-md:py-1;
&.hidden {
@apply hidden;
}
& + & {
@apply mt-3 max-md:mt-2;
}
& > .cbi-value-title {
@apply pt-1 text-right font-medium max-md:w-auto max-md:text-left md:flex-[0_0_12rem];
}
& > .cbi-value-field {
@apply max-w-full flex-1;
&:has(> .cbi-dropdown[disabled]) {
@apply cursor-not-allowed;
}
& .cbi-value-description {
@apply text-text-muted relative mt-1 pl-4 leading-none wrap-break-word;
&:not(:empty) {
&::before {
@apply bg-info absolute -left-0.5 inline-block size-4 content-[''] [mask:var(--icon-info)_center/cover_no-repeat];
}
}
}
}
& > .cbi-section,
& > .cbi-tblsection {
@apply w-full;
}
}
.cbi-dynlist {
@apply inline-flex w-max max-w-120 flex-col items-start gap-3 max-md:max-w-full!;
& .item {
@apply border-hairline bg-surface pointer-events-auto relative inline-flex cursor-move flex-col items-start gap-2 self-stretch overflow-hidden rounded-2xl border py-3 pr-10 pl-4 break-all shadow-sm transition-[transform,box-shadow,opacity,border-color,background-color] duration-150 select-text max-md:w-full max-md:py-2.5 max-md:pr-8 max-md:pl-3;
&::after {
@apply bg-surface-sunken text-text-muted absolute top-2.5 right-2 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-xl text-sm font-medium content-['\00D7'];
}
&.dragging {
@apply scale-95 cursor-grabbing opacity-50 shadow-2xl;
}
&.drag-over {
@apply border-brand bg-brand-subtle ring-brand-subtle scale-105 shadow-lg ring-2;
}
& > span,
& > code {
@apply pointer-events-none w-full rounded-lg font-mono leading-relaxed;
}
}
& .placeholder {
@apply break-all;
}
& .add-item {
@apply border-hairline hover:border-hairline hover:bg-surface-sunken inline-flex items-center gap-1.5 self-stretch rounded-2xl border border-dashed bg-transparent px-1 py-1 transition-[border-color,background-color] duration-150;
& > input {
@apply min-w-61 flex-1;
}
& > .cbi-button {
@apply inline-flex min-h-6 min-w-6 shrink-0 cursor-pointer items-center justify-center rounded-xl px-2 py-0 text-sm font-medium shadow-none active:scale-95;
}
}
}
@@ -0,0 +1,69 @@
input {
@apply disabled:cursor-not-allowed disabled:opacity-(--app-opacity-disabled);
}
input[type="text"],
input[type="password"],
.cbi-input-text,
.cbi-input {
@apply text-text border-hairline bg-control-bg placeholder-text-muted focus:border-brand focus:ring-focus-ring relative w-52.5 max-w-full rounded-2xl border px-3 py-1.5 text-sm font-normal shadow-sm transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:outline-none;
.table.cbi-section-table & {
@apply w-full;
}
}
.cbi-input-text {
@apply min-w-20 max-md:min-w-14;
}
#localtime {
@apply min-w-70;
}
input[type="radio"],
input[type="checkbox"] {
@apply relative mr-3 inline-block h-4 w-4 cursor-pointer appearance-none align-middle disabled:cursor-not-allowed;
&::before {
@apply border-hairline bg-control-bg absolute top-0 left-0 h-4 w-4 border transition-[background-color,border-color,box-shadow] duration-150 content-[''];
}
&::after {
@apply bg-on-brand absolute top-0.5 left-0.5 h-3 w-3 opacity-0 transition-opacity duration-150 content-[''];
}
&:checked::before {
@apply border-brand bg-brand;
}
&:checked::after {
@apply opacity-100;
}
@variant hover {
&::before {
@apply border-hairline;
}
}
&:focus::before {
@apply border-brand ring-focus-ring ring-2 outline-none;
}
}
input[type="radio"] {
&::before {
@apply rounded-full;
}
&::after {
@apply [mask:var(--icon-radio)_center/cover_no-repeat];
}
}
input[type="checkbox"] {
&::before {
@apply rounded;
}
&::after {
@apply [mask:var(--icon-check)_center/cover_no-repeat];
}
}
.cbi-checkbox {
@apply relative inline-flex items-center align-middle;
}
@@ -0,0 +1,53 @@
.alert-message {
/* Radius matches `.cbi-section` (16px): the alert sits in the content layer,
same width and edge alignment as the sections it stacks above. The larger
radii in this theme belong to overlays (24px) and pills (32px). */
@apply bg-surface-sunken text-text border-hairline mb-4 rounded-2xl border p-6 max-md:mx-0 max-md:mb-3 max-md:p-4;
.modal & {
@apply mb-0;
}
.login-shell & {
@apply mb-0 px-2 py-2.5 text-center text-base max-md:px-0.5;
}
&.success {
@apply border-hairline bg-success-surface text-success;
}
&.info {
@apply border-hairline bg-info-surface text-info;
}
&.warning,
&.notice {
@apply border-hairline bg-warning-surface text-warning;
}
&.error,
&.danger {
@apply border-hairline bg-danger-surface text-danger;
}
h4,
h5,
pre,
ul,
li,
p {
@apply border-0 bg-transparent text-inherit;
}
& h4 {
@apply mb-2 text-lg font-semibold max-md:mb-1.5 max-md:text-base;
}
& p {
@apply text-sm leading-relaxed max-md:text-sm;
}
& .right {
@apply mt-4 max-md:mt-3;
}
}
@@ -0,0 +1,128 @@
#modal_overlay {
@apply pointer-events-none fixed top-0 bottom-0 hidden overflow-auto bg-transparent;
.modal-overlay-active & {
@apply bg-scrim pointer-events-auto inset-0 right-0 left-0 z-100 grid grid-cols-1 place-items-center backdrop-blur-md backdrop-saturate-150;
}
& > .modal {
@apply border-hairline bg-surface-overlay relative flex w-5xl flex-col gap-4 rounded-3xl border p-6 wrap-break-word whitespace-normal shadow-2xl max-md:w-full max-md:gap-3 max-md:p-4;
& h4 {
@apply mb-0 text-center;
& em {
@apply text-brand font-semibold;
}
}
& h5 {
@apply text-text my-3;
}
& p {
@apply text-text text-sm leading-relaxed;
}
& > ul {
@apply border-hairline overflow-auto rounded-2xl border p-3;
}
& label.btn {
@apply border-hairline bg-surface-sunken text-text hover:border-hairline border;
}
& pre {
@apply overflow-auto;
&.errors {
@apply border-hairline bg-danger-surface text-danger;
}
}
pre + pre {
@apply mt-3;
}
& .button-row,
& div.left,
& div.right {
@apply border-hairline flex shrink-0 gap-3 border-t p-4 max-md:gap-1.5 max-md:p-2.5;
}
& div.left {
@apply justify-start;
}
& .button-row,
& div.right {
@apply justify-end;
}
&.uci-dialog {
& ins,
& del,
& var {
@apply font-mono not-italic no-underline shadow-sm;
}
& ins {
@apply border-hairline bg-success-surface text-success border;
}
& del {
@apply border-hairline bg-danger-surface text-danger border;
}
& var {
@apply border-hairline bg-info-surface text-info border;
}
& .uci-change-legend {
@apply border-hairline bg-surface-sunken mt-4 grid grid-cols-2 gap-3 rounded-2xl border p-4 max-md:grid-cols-1 max-md:gap-2 max-md:p-3;
& .uci-change-legend-label {
@apply text-text flex items-center gap-2 text-sm font-medium;
& ins,
& del,
& var {
@apply flex h-6 min-w-6 items-center justify-center rounded-lg px-2 text-xs font-semibold;
}
& var {
& ins,
& del {
@apply ml-1 h-4 min-w-4 px-1;
}
}
}
}
& .uci-change-list {
@apply mt-4 space-y-3;
& h5 {
@apply bg-surface-sunken text-text mt-6 mb-2 rounded-xl px-3 py-2 text-sm font-semibold first:mt-0;
}
& ins,
& del {
@apply block rounded-xl px-4 py-3 text-sm;
& strong {
@apply text-sm;
}
}
& var {
@apply inline-block rounded-lg px-2 py-1 text-sm;
& ins,
& del {
@apply ml-1 inline-block px-1.5 py-0.5 text-xs;
}
}
}
}
}
}
@@ -0,0 +1,169 @@
/**
* Shared navigation vocabulary.
*
* One visual definition consumed by the desktop sidebar, the mobile
* drawer and (incrementally) the other navigation modes. Mode files
* (_layout.css, _overlay.css) keep positioning, sizing overrides and
* show/hide state only — never duplicate these recipes there.
*/
.nav-row {
@apply focus-visible:ring-focus-ring flex w-full cursor-pointer appearance-none items-center border-0 bg-transparent text-left no-underline shadow-none transition-colors duration-150 select-none hover:no-underline focus-visible:ring-2 focus-visible:outline-none;
}
.nav-link {
/* hover:no-underline: the global `a:hover { underline }` in _elements.css
outranks a bare class (a:hover is 0,1,1), so nav rows must opt out at
the same specificity tier. */
@apply text-text hover:bg-hover-faint block rounded-xl px-3 py-1.5 no-underline transition-colors duration-150 hover:no-underline;
}
.navigation-direct {
@apply text-text hover:text-text;
}
/* Direct destinations use the same selected state in both navigation modes:
a filled brand pill, matching the active sublink. */
.navigation-direct.is-active-page {
@apply text-brand hover:text-brand bg-brand-subtle;
}
:where(.sidebar-list) {
& .nav-row {
@apply text-text-muted hover:text-text;
}
& .navigation-direct {
@apply hover:bg-hover-faint;
}
}
.navigation-group-toggle {
/* size-4.5 ≈ the row's text height — 3.5 read as undersized next to the
text-lg category labels, on desktop and in the mobile drawer alike. */
&::after {
@apply size-4.5 shrink-0 bg-current opacity-55 transition-[transform,opacity] duration-[250ms] content-[''] [mask:var(--icon-arrow-right)_center/cover_no-repeat];
}
@variant hover {
&::after {
@apply opacity-100;
}
}
}
/* An expanded group's label turns brand and its arrow rotates open. */
.navigation-group.is-expanded > .navigation-group-toggle {
@apply text-brand;
&::after {
@apply rotate-90;
}
}
/* The active group keeps its brand label even when the user manually
collapses it — otherwise the active-page pill is hidden inside the inert
region and no "you are here" marker survives. No arrow rotation here: a
collapsed group's arrow must still point right. */
.navigation-group.is-active-group > .navigation-group-toggle {
@apply text-brand;
}
/* ── Row icons ──
A leading glyph inline with the label, on sidebar and mobile-drawer
rows alike (the mega-menu title draws its own ::before). bg-current +
mask lets the glyph track the row's text colour through hover, expanded
and active states; the size is set per surface — sidebar rows in
_layout.css, drawer rows in _overlay.css. */
.nav-icon {
@apply shrink-0 bg-current opacity-55 transition-opacity duration-150 [mask:var(--menu-icon,var(--icon-category))_center/contain_no-repeat];
}
.nav-label,
.nav-category-label {
@apply min-w-0 flex-1 truncate;
}
/* Full-strength glyph wherever the row itself is highlighted. */
.navigation-direct:hover .nav-icon,
.navigation-group-toggle:hover .nav-icon,
.navigation-direct.is-active-page .nav-icon,
.navigation-group.is-expanded > .navigation-group-toggle .nav-icon,
.navigation-group.is-active-group > .navigation-group-toggle .nav-icon {
@apply opacity-100;
}
.navigation-group-region {
@apply grid grid-rows-[0fr] opacity-0 transition-[grid-template-rows,opacity] duration-[250ms] ease-out;
}
.navigation-group.is-expanded > .navigation-group-region {
@apply grid-rows-[1fr] opacity-100;
}
.navigation-submenu-list {
@apply min-h-0 list-none overflow-hidden;
}
.navigation-sublink {
@apply text-text-muted hover:bg-hover-faint hover:text-text relative flex rounded-xl font-medium no-underline transition-colors duration-150;
}
/* Active page: a filled brand pill, shared by the sidebar and the drawer. */
.navigation-sublink.is-active-page {
@apply text-brand hover:text-brand bg-brand-subtle font-semibold;
}
.nav-category-preview {
@apply text-text-subtle truncate pb-1;
& .nav-preview-current {
@apply text-brand;
}
}
/* ── First-level section icons ──
The name → icon map, shared by every navigation surface: the mega-menu
title (::before consumer in _layout.css) and the sidebar/mobile-drawer
row glyphs (.nav-icon below). Keyed on the LuCI node name (data-section,
set by menu-aurora.js) — stable and language-independent. Scoped to the
three row elements that carry the attribute so the selector can't
accidentally match unrelated data-section usage elsewhere; :is() keeps
every key at (0,2,0) — the mega-menu consumer's fallback chain would
outrank anything higher (see _layout.css). The only maintenance point:
add new first-level sections here; anything unmapped falls back to the
default icon at the consumer. */
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="status"] {
@apply [--menu-icon:var(--icon-activity)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="statistics"] {
@apply [--menu-icon:var(--icon-chart-bar)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="nlbw"] {
@apply [--menu-icon:var(--icon-gauge)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="system"] {
@apply [--menu-icon:var(--icon-settings)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="services"] {
@apply [--menu-icon:var(--icon-apps)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="nas"] {
@apply [--menu-icon:var(--icon-server)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="control"] {
@apply [--menu-icon:var(--icon-adjustments)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="network"] {
@apply [--menu-icon:var(--icon-world)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="vpn"] {
@apply [--menu-icon:var(--icon-shield)];
}
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="docker"] {
@apply [--menu-icon:var(--icon-box)];
}
/* "asterisk" covers VoIP/PBX apps (e.g. luci-app-asterisk forks) — no
official OpenWrt package registers a verified menu.d node under this
name, so this is a best-effort key. */
:is(.desktop-nav-title, .navigation-direct, .navigation-group-toggle)[data-section="asterisk"] {
@apply [--menu-icon:var(--icon-phone)];
}
@@ -0,0 +1,96 @@
.mobile-menu-overlay {
/* The mobile surface is opaque, so filtering pixels behind it has no visual
effect and only adds a full-screen paint/compositing cost. */
@apply max-md:bg-mega-menu-bg max-md:invisible max-md:fixed max-md:inset-0 max-md:z-60 max-md:opacity-0 md:hidden;
/* Transitions live on the OPEN state only: opening fades in, closing cuts
instantly. Link taps close into a full-page navigation, and any close
fade racing the document swap freezes mid-frame as a ghost. */
&.mobile-menu-open {
@apply max-md:visible max-md:opacity-100 max-md:transition-[visibility,opacity] max-md:duration-[250ms];
}
.mobile-nav {
@apply max-md:flex max-md:h-full max-md:w-full max-md:flex-col max-md:pt-14;
& .mobile-nav-body {
@apply max-md:flex max-md:min-h-0 max-md:flex-1 max-md:flex-col max-md:px-5 max-md:pt-6;
& .mobile-nav-label {
@apply max-md:text-text-muted max-md:mb-3 max-md:text-sm max-md:font-medium;
}
}
& .mobile-nav-list {
@apply max-md:m-0 max-md:flex max-md:min-h-0 max-md:flex-1 max-md:-translate-y-2 max-md:list-none max-md:flex-col max-md:gap-y-4 max-md:overflow-y-auto max-md:overscroll-contain max-md:p-0 max-md:pb-5 max-md:opacity-0;
& .mobile-nav-item {
@apply max-md:shrink-0;
& .nav-row {
/* gap-3 (not 4): tight enough that the leading .nav-icon reads
attached to its label; justify-between still pins the group
arrow to the right edge. */
@apply max-md:min-h-13 max-md:justify-between max-md:gap-3 max-md:rounded-none max-md:bg-transparent max-md:px-0 max-md:py-2.5 max-md:text-2xl max-md:leading-tight max-md:font-medium max-md:tracking-tight;
& .nav-icon {
/* Row icons at drawer scale, against the text-2xl labels. */
@apply max-md:size-6;
}
}
& .mobile-nav-submenu {
& .mobile-nav-submenu-list {
/* pl: rows are px-0, so icon (1.5) + gap (0.75) put the label
at 2.25rem; sublinks bring px-3, the list supplies the rest. */
@apply max-md:m-0 max-md:p-0 max-md:pl-6;
}
& .mobile-nav-subitem {
& .mobile-nav-sublink {
@apply max-md:min-h-10 max-md:w-full max-md:items-center max-md:px-3 max-md:py-2 max-md:text-base;
}
}
}
}
}
& .mobile-nav-footer {
@apply max-md:border-hairline max-md:flex max-md:shrink-0 max-md:items-center max-md:justify-between max-md:border-t max-md:px-5 max-md:pt-4 max-md:pb-[max(1rem,env(safe-area-inset-bottom))];
& .mobile-nav-footer-action {
@apply max-md:flex max-md:items-center;
}
& .mobile-nav-logout {
@apply max-md:text-text max-md:hover:text-brand max-md:text-sm max-md:font-medium max-md:no-underline max-md:transition-colors max-md:duration-150;
}
& .theme-switcher {
& .theme-option {
@apply max-md:px-2 max-md:py-1;
}
}
}
}
&.mobile-menu-open .mobile-nav-list {
@apply max-md:translate-y-0 max-md:opacity-100 max-md:transition-[translate,opacity] max-md:duration-[250ms] max-md:ease-out;
}
}
body.mobile-navigation-open > header {
@apply max-md:z-70 max-md:bg-transparent;
}
[data-nav-type="mega-menu"] {
/* Dim only: a blurred full-screen fade drops frames on weak GPUs. Visibility
flips on a delay instead of tweening, so the opacity fade stays composited. */
& .desktop-menu-overlay {
@apply bg-mega-menu-scrim pointer-events-none invisible fixed inset-0 z-60 opacity-0 [transition:opacity_220ms_cubic-bezier(0.4,0,0.6,1),visibility_0s_220ms] max-md:hidden;
&.active {
@apply pointer-events-auto visible opacity-100 [transition-delay:0s];
}
}
}
@@ -0,0 +1,164 @@
/**
* Command palette (⌘K) — Spotlight-style, available in all three nav types
* (sidebar / mega-menu / dropdown). The trigger sits at the header's right
* edge next to #indicators; ⌘K / Ctrl+K toggles the panel globally. Class
* names mirror luci-theme-shadcn's palette so the two themes stay legible
* side by side.
*
* The panel is built lazily by menu-aurora.js on first open; its index is
* the navigation model the menus already render from (no extra requests)
* plus three theme-mode command rows. An empty query browses the whole
* index; typed queries rank via a fuzzy subsequence scorer; a leading ">"
* (or full-width ">") scopes the list to the command rows.
*/
.cmdk-trigger {
/* Hover is a scale nudge with no plate behind it — the header's own
language, set by .navigation-toggle and shared with #indicators. The
size-8 box stays as the touch target; it just never paints.
order-last pins it to the bar's right edge: #indicators sits before it
and grows leftward, so a late indicator never shifts the trigger. */
@apply text-text relative order-last grid size-8 shrink-0 cursor-pointer place-items-center rounded-lg border-0 bg-transparent p-0 shadow-none transition-transform duration-150;
/* size-5 (not the button's own size): the same box #indicators gives its
glyphs, so the shared 24×24 Tabler canvas scales identically and the
search icon carries the same stroke weight as the poll/changes ones
sitting next to it. */
&::before {
@apply size-5 bg-current content-[''] [mask:var(--icon-search)_center/contain_no-repeat];
}
&:hover {
@apply scale-105;
}
&:active {
@apply scale-95;
}
&:focus-visible {
@apply ring-focus-ring ring-2 outline-none;
}
}
.cmdk-panel {
@apply border-hairline bg-surface/85 fixed top-24 left-1/2 z-120 w-[min(36rem,calc(100vw-2.5rem))] -translate-x-1/2 overflow-hidden rounded-2xl border shadow-xl backdrop-blur-xl backdrop-saturate-150 transition-[opacity,translate] duration-150 ease-out starting:-translate-y-2 starting:opacity-0;
/* <md: the same panel becomes a full-screen takeover (Algolia DocSearch
manner) — opaque page background (no full-screen blur cost on phones),
input bar pinned top with a Cancel exit, results fill the rest. */
@apply max-md:top-0 max-md:right-0 max-md:bottom-0 max-md:left-0 max-md:flex max-md:w-auto max-md:translate-none max-md:flex-col max-md:rounded-none max-md:border-0 max-md:bg-bg max-md:shadow-none max-md:backdrop-blur-none max-md:backdrop-saturate-100;
& .cmdk-inputrow {
@apply flex items-center gap-3 px-5 py-3.5;
@apply max-md:border-hairline max-md:bg-surface max-md:border-b max-md:px-4 max-md:py-2.5;
&::before {
@apply text-text-subtle size-5 shrink-0 bg-current content-[''] [mask:var(--icon-search)_center/contain_no-repeat];
}
& .cmdk-input {
@apply text-text placeholder-text-subtle w-full min-w-0 flex-1 rounded-none border-0 bg-transparent p-0 text-base shadow-none focus:ring-0 focus:outline-none;
}
/* Shown only while the field holds a query: :placeholder-shown is true
exactly when the input is empty, so the state needs no JS mirror. */
& .cmdk-clear {
@apply text-text-subtle grid size-5 shrink-0 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 shadow-none transition-colors duration-150;
&::before {
@apply size-4 bg-current content-[''] [mask:var(--icon-x)_center/contain_no-repeat];
}
&:hover {
@apply text-text;
}
.cmdk-input:placeholder-shown ~ & {
@apply hidden;
}
}
& .cmdk-cancel {
@apply text-brand hidden shrink-0 cursor-pointer border-0 bg-transparent p-1 text-sm shadow-none max-md:block;
}
}
& .cmdk-list {
@apply border-hairline max-h-80 overflow-y-auto border-t p-2 empty:hidden;
@apply max-md:max-h-none max-md:flex-1 max-md:overscroll-contain;
& .cmdk-row {
@apply text-text flex items-center gap-3 rounded-xl px-3 py-2 text-sm no-underline;
& .cmdk-title {
@apply min-w-0 truncate;
}
& .cmdk-group-name {
@apply text-text-subtle ml-auto shrink-0 text-xs;
}
& mark {
@apply text-brand bg-transparent font-semibold;
}
&.is-selected {
@apply bg-brand-subtle;
& .cmdk-title {
@apply text-brand font-medium;
}
}
}
& .cmdk-empty {
@apply text-text-subtle px-3 py-6 text-center text-sm;
}
}
& .cmdk-footer {
@apply border-hairline text-text-subtle flex items-center gap-4 border-t px-4 py-2 text-xs max-md:hidden;
& .cmdk-hint-close {
@apply ml-auto;
}
& kbd {
@apply border-hairline bg-surface-sunken text-text-muted rounded-md border px-1.5 py-px font-mono text-[11px];
}
}
}
/* A tab row reads "Parent › Title": the parent gives way first, and keeps
at least an ellipsis so the "›" never leads the row. Like the section
label, it stays subtle on the selected row. Unnested: the classes exist
only inside palette rows, and the short selectors keep main.css lean. */
.cmdk-title:has(> .cmdk-parent) {
@apply flex items-baseline;
}
.cmdk-parent {
@apply text-text-subtle min-w-0 truncate font-normal;
}
.cmdk-label {
@apply max-w-[calc(100%-1.5rem)] shrink-0 truncate;
&::before {
@apply text-text-subtle px-1.5 font-normal content-['›'];
}
}
/* The frost is decorative — both degradation paths go opaque. */
@supports not (backdrop-filter: blur(1px)) {
.cmdk-panel {
@apply bg-surface;
}
}
@media (prefers-reduced-transparency: reduce) {
.cmdk-panel {
@apply bg-surface;
}
}
@@ -0,0 +1,15 @@
.cbi-progressbar {
@apply bg-surface-sunken relative h-3.5 w-full cursor-help overflow-hidden rounded-full max-md:h-4;
&::before {
@apply text-text absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-2xl text-xs whitespace-nowrap content-[attr(title)] max-md:text-xs max-md:leading-normal;
}
[data-page="admin-system-package-manager"] & {
&::before {
@apply max-sm:text-[10px];
}
}
& > div {
@apply from-progress-start to-progress-end h-full bg-linear-to-r transition-[width] duration-[250ms];
}
}
@@ -0,0 +1,30 @@
.cbi-tabmenu {
@apply border-hairline bg-surface-sunken mb-1 flex items-center gap-1 overflow-x-auto rounded-4xl border p-1;
& li {
@apply relative m-0 min-w-fit shrink-0 list-none;
&[data-errors] {
&::after {
@apply bg-danger text-on-brand absolute -top-0.5 -right-1.5 z-20 inline-flex min-h-4 min-w-4 items-center justify-center rounded-full px-1.5 py-0.5 text-xs font-semibold content-[attr(data-errors)];
}
& > a {
@apply border-hairline border;
}
}
& > a {
@apply text-text-muted hover:text-text block rounded-4xl px-4 py-2 text-center text-sm font-medium whitespace-nowrap no-underline;
}
&.cbi-tab a {
@apply bg-text text-surface font-semibold shadow-sm;
}
}
}
[data-tab-title] {
@apply invisible h-0 overflow-hidden;
}
[data-tab-active="true"] {
@apply visible h-auto overflow-visible;
}
@@ -0,0 +1,7 @@
select {
@apply text-text border-hairline bg-control-bg focus:border-brand focus:ring-focus-ring min-w-52.5 max-w-full appearance-none md:max-w-100 rounded-2xl border px-3 py-1.5 pr-10 text-sm font-normal shadow-sm transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:outline-none;
@apply bg-size-[16px] bg-position-[right_0.75rem_center] bg-no-repeat [background-image:var(--icon-arrow-down)] dark:[background-image:var(--icon-arrow-down-dark)];
&[disabled] {
@apply cursor-not-allowed opacity-(--app-opacity-disabled);
}
}
@@ -0,0 +1,73 @@
.theme-switcher {
@apply bg-surface-sunken relative inline-flex items-center gap-0 rounded-full shadow-sm transition-transform duration-150 max-md:py-0.5;
@apply border-hairline border;
&::before {
@apply bg-surface-overlay absolute top-1 left-1 z-0 h-[calc(100%-0.5rem)] w-[calc(33.333%-0.5rem)] rounded-full shadow-md transition-transform duration-[250ms] content-[''];
}
footer & {
@apply max-md:hidden;
}
& .theme-option {
@apply relative z-10 flex cursor-pointer items-center justify-center gap-1.5 rounded-full px-3 py-1.5 transition-transform duration-150 hover:scale-105 active:scale-95;
& input[type="radio"] {
@apply sr-only;
}
& .theme-icon {
@apply text-text-muted flex items-center justify-center transition-colors duration-150;
& svg {
@apply size-4 transition-transform duration-150;
}
}
& .theme-label {
@apply text-text-muted hidden text-xs font-medium transition-colors duration-150;
}
&.active {
& .theme-icon {
@apply text-text;
& svg {
@apply scale-110;
}
}
& .theme-label {
@apply text-text;
}
}
&:hover:not(.active) {
& .theme-icon {
@apply text-text;
}
& .theme-label {
@apply text-text;
}
}
}
&:has(.theme-option[data-theme="device"].active) {
&::before {
@apply translate-x-0;
}
}
&:has(.theme-option[data-theme="light"].active) {
&::before {
@apply translate-x-[calc(100%+0.5rem)];
}
}
&:has(.theme-option[data-theme="dark"].active) {
&::before {
@apply translate-x-[calc(200%+1rem)];
}
}
}
@@ -0,0 +1,156 @@
/*
Log viewer for the core System/Kernel Log pages (admin/status/logs/*).
This is theme styling for a stock LuCI page, so it lives in the main.css
component pipeline — NOT in patches/ — and consumes the Tailwind token
system: radii resolve through the --radius-base chain, shadows through
--app-shadow-*, colors through the theme map, so config-app overrides of
the base tokens reach this page like any other. (patches/ stays reserved
for third-party compatibility, written in plain CSS.)
The class names are deliberately global, not page-scoped: any package may
reuse the same markup contract for its own log UI — .syslog-view wrapping
.log-row rows built from .log-time / .log-sev / .log-tag / .log-msg spans,
with an lv-{info|notice|warn|err|crit|debug} severity class on the row —
and inherit this component wholesale.
The companion JS ships on-demand as patches/admin-status-logs.js. It
parses the read-only #syslog textarea into a .syslog-view sibling and
marks #content_syslog with .log-enhanced. Without JS (or when its parse
gate trips) none of the viewer markup exists and the stock textarea
styling above still applies.
Chosen design (user-picked variant "彩色级别词", Vercel/Axiom style):
min-width time · level · source columns so messages start flush while
every token renders verbatim — year, timezone, colons, ctime padding all
kept, nothing truncated — so a copied row is byte-identical to the source
line; the level token is colored per severity, source neutral,
err-and-above rows tinted, whole lines with sideways scrolling (the stock
textarea's wrap="off" model). Fields are
inline-blocks inside inline flow (not grid/flex) so the real spaces
between them survive into copied text.
*/
#content_syslog {
@apply m-2 max-md:m-1;
& > div {
@apply flex flex-wrap items-center gap-x-2 max-md:gap-x-1.5;
/* Upstream drops an inline margin-bottom:10px on some of these; under
items-center that reads as half a margin of offset. */
& > select,
& > input {
@apply my-0!;
}
& > .cbi-input-select,
& > .cbi-input-text {
@apply max-md:min-w-45;
}
}
}
/* The viewer is a child div too, and a bare `.syslog-view` (0,1,0) loses to
the rule above — the escape has to carry the id. */
#content_syslog > .syslog-view {
@apply block;
}
/* #log_textarea: same contract under a third-party id (luci-app-aria2,
-v2raya, -openlist). */
#syslog,
#log_textarea {
@apply w-full font-mono text-xs leading-snug;
}
#syslog {
/* Explicit border color: bare `border` falls back to currentColor
(near-black text) in Tailwind v4. mb: upstream leaves the gap above
"Scroll to head" at zero, so the log window supplies it. */
@apply bg-surface-sunken border-hairline text-text mb-5 rounded-3xl border p-6 shadow-lg max-md:p-3;
}
#content_syslog.log-enhanced > #syslog {
@apply hidden;
}
.syslog-view {
@apply w-full;
/* Same shell as the stock textarea, with the border color made explicit:
a bare `border` falls back to currentColor (near-black) in Tailwind v4. */
@apply bg-surface-sunken border-hairline text-text mb-5 rounded-3xl border p-6 shadow-lg max-md:p-3;
@apply font-mono text-xs leading-relaxed;
/* Whole lines, sideways scroll (the stock textarea's wrap="off" model). */
@apply overflow-x-auto;
/* Focusable (tabIndex in the companion JS) so select-all stays inside the
log; only keyboard focus draws the ring — a click into the log must not. */
@apply focus-visible:ring-focus-ring outline-none focus-visible:ring-2;
& .log-row {
/* max-content width so hover/tint backgrounds span the scrolled width. */
@apply w-max min-w-full rounded-md px-2 whitespace-pre;
&:hover {
@apply bg-hover-faint;
}
}
/* The browser-default selection highlight turns the dimmed fields to mud;
use the theme's info surface pair and restore full text contrast. */
& ::selection {
@apply bg-info-surface text-text;
}
& .log-time {
@apply text-text-subtle;
/* ctime stamps are a fixed 24ch; RPC datestrs run longer but uniform. */
@apply md:inline-block md:min-w-[24ch] md:align-bottom;
}
& .log-sev {
/* "authpriv.notice:" is 16ch — the longest real fac.sev token. */
@apply font-semibold;
@apply md:inline-block md:min-w-[16ch] md:align-bottom;
}
& .log-tag {
@apply text-text-muted;
/* min-width, not a clamp: long tags extend rather than truncate. */
@apply md:inline-block md:min-w-[18ch] md:align-bottom;
}
& .lv-info .log-sev {
@apply text-info;
}
& .lv-notice .log-sev {
@apply text-success;
}
& .lv-warn .log-sev {
@apply text-warning;
}
& .lv-debug {
@apply text-text-subtle;
& .log-sev,
& .log-tag {
@apply text-text-subtle;
}
}
/* err and above are rare and load-bearing — full-row emphasis. */
& .lv-err,
& .lv-crit {
@apply bg-danger-surface;
&:hover {
@apply bg-danger-surface-hover;
}
& .log-sev {
@apply text-danger;
}
}
}
@@ -0,0 +1,22 @@
#tabmenu {
@apply mb-8 w-full;
}
.tabs {
@apply border-hairline relative flex items-center gap-0 overflow-x-auto border-b;
& a {
@apply text-text-muted hover:text-text block px-8 py-4 text-center text-sm font-medium whitespace-nowrap transition-colors duration-150 hover:no-underline;
}
& > li.active {
@apply border-text border-b-2;
& > a {
@apply text-text font-semibold;
}
}
}
.cbi-section-node-tabbed {
@apply mt-6;
}
@@ -0,0 +1,249 @@
table.table,
.table {
@apply border-hairline mb-3 w-full border border-separate border-spacing-0 overflow-visible rounded-2xl text-base max-md:mx-0 max-md:block max-md:w-full max-md:overflow-visible max-md:rounded-none max-md:border-0 max-md:text-sm max-md:shadow-none;
&[width="100%"] {
@apply w-full;
}
&[width="33%"] {
@apply w-1/3;
}
& .cbi-section-table-titles {
@apply font-bold;
}
& .cbi-section-table-titles.named,
& .cbi-section-table-descr.named,
& .cbi-section-table-row[data-title] {
&::before {
@apply border-hairline table-cell px-3 py-3 align-middle text-base font-semibold content-[attr(data-title)] max-md:flex max-md:flex-[0_0_100%] max-md:px-3 max-md:py-2.5 max-md:text-sm md:border-b;
}
&:not([data-title]),
&:has(td.cbi-section-table-titles) {
&::before {
@apply content-none;
}
}
}
& .cbi-section-table-titles.named {
&::before {
@apply text-text-subtle text-xs font-semibold tracking-wider uppercase;
}
}
& tbody,
& .tbody {
@apply max-md:block;
}
& tr,
& .tr {
@apply max-md:border-hairline max-md:flex max-md:flex-wrap max-md:border-b max-md:px-2 max-md:py-2;
@apply has-[.cbi-progressbar]:max-md:flex has-[.cbi-progressbar]:max-md:items-center has-[.cbi-progressbar]:max-md:justify-center;
&:first-child {
& th,
& .th {
@apply first:rounded-tl-2xl last:rounded-tr-2xl;
}
}
&:last-child {
@apply max-md:border-b-0;
&[data-title] {
&::before {
@apply border-b-0;
}
}
.td {
@apply border-b-0;
}
}
&.table-titles,
&.cbi-section-table-titles,
&.cbi-section-table-descr {
@apply max-md:hidden;
}
&.cbi-rowstyle-1,
&.cbi-rowstyle-2 {
@apply bg-transparent;
}
& > .col-1 {
@apply max-md:flex-[1_1_2rem] md:w-20 md:max-w-28;
}
& > .col-2 {
@apply whitespace-normal max-md:flex-[2_2_4rem] md:w-32 md:max-w-40;
}
& > .col-3 {
@apply max-md:flex-[3_3_6rem] md:w-44 md:max-w-52;
}
& > .col-4 {
@apply max-md:flex-[4_4_8rem] md:w-56 md:max-w-64;
}
& > .col-5 {
@apply max-md:flex-[5_5_10rem] md:w-68 md:max-w-76;
}
& > .col-6 {
@apply max-md:flex-[6_6_12rem] md:w-80 md:max-w-88;
}
& > .col-7 {
@apply max-md:flex-[7_7_14rem] md:w-92 md:max-w-100;
}
& > .col-8 {
@apply max-md:flex-[8_8_16rem] md:w-104 md:max-w-112;
}
& > .col-9 {
@apply max-md:flex-[9_9_18rem] md:w-116 md:max-w-124;
}
& > .col-10 {
@apply max-md:max-w-[calc(100vw-40px)] max-md:flex-[0_0_100%] md:w-128 md:max-w-136;
}
}
& th,
& .th {
@apply border-hairline bg-surface-sunken text-text-subtle border-b px-3 py-3 text-left text-xs font-semibold tracking-wider uppercase max-md:flex-[1_1_50%] max-md:border-0 max-md:bg-transparent;
#cbi-samba4 & {
@apply px-0.5 py-1.5;
}
&[width="100%"] {
@apply w-full max-md:flex-[0_0_100%];
}
&[width="33%"] {
@apply w-1/3 max-md:flex-[0_0_33.333%];
}
&[data-sortable-row="true"] {
@apply hover:bg-hover-faint cursor-pointer select-none;
&::after {
@apply ml-0.5 text-xs content-[''];
}
&[data-sort-direction="asc"] {
&::after {
@apply content-['\25B2'];
}
}
&[data-sort-direction="desc"] {
&::after {
@apply content-['\25BC'];
}
}
}
}
&[id*="status_leases"] {
& .td {
@apply max-w-62 max-md:max-w-full;
}
}
& td,
& .td {
@apply border-hairline table-cell border-b px-3 py-3 align-middle wrap-break-word whitespace-normal max-md:flex-[1_1_50%] max-md:border-0 max-md:px-1 max-md:py-1;
&::before {
@apply hidden content-[attr(data-title)] max-md:mb-1 max-md:block max-md:text-xs max-md:font-semibold max-md:tracking-wider;
}
#cbi-samba4 & {
@apply px-0.5 py-1.5;
}
[data-page="admin-system-mounts"] & {
@apply max-w-104 max-md:max-w-full;
}
#wifi_assoclist_table & {
@apply max-md:flex-[0_0_100%] max-md:px-3 max-md:py-2;
&::before {
@apply max-md:mb-1.5;
}
}
& > input[type="text"],
& > input[type="password"],
& select,
& .cbi-dropdown:not(.btn):not(.cbi-button) {
@apply w-full;
}
/* Widgets are nested (td > div > div > widget), so the fixed/min widths
from _select.css/_dropdown.css must yield to the column width here. */
& select,
& .cbi-dropdown:not(.btn):not(.cbi-button) {
@apply min-w-fit;
}
&.cbi-value-field {
/* Mobile cards (bootstrap-style): value fields stack one per row —
the row title and long match-rule cells get the full width — while
display-only widgets below pair up two per row. */
@apply wrap-anywhere md:max-w-prose max-md:mb-1 max-md:basis-full max-md:self-start max-md:text-left;
&[data-widget="CBI.DummyValue"],
&[data-widget="CBI.Button"],
&[data-widget="CBI.FlagValue"],
&[data-widget="dvalue"],
&[data-widget="button"],
&[data-widget="fvalue"] {
@apply max-md:basis-1/2;
}
}
&.cbi-section-actions {
@apply max-md:flex-[0_0_100%];
& > div {
@apply max-md:w-full;
& > .cbi-button {
@apply max-md:flex-1;
}
}
}
& > .cbi-button {
@apply max-md:w-full;
}
&[width="100%"] {
@apply w-full max-md:flex-[0_0_100%];
}
&[width="33%"] {
@apply w-1/3 max-md:flex-[0_0_33.333%];
}
[data-page="admin-network-network"] & {
&[data-name="_ifacebox"],
&[data-name="_ifacestat"] {
@apply max-md:basis-[100%];
}
}
}
}
.cbi-section-table {
.cbi-section-table-titles {
.cbi-section-table-cell {
@apply !w-auto;
}
}
}
@@ -0,0 +1,6 @@
textarea {
@apply text-text border-hairline bg-control-bg placeholder-text-muted focus:border-brand focus:ring-focus-ring min-h-24 w-full resize-y rounded-2xl border px-3 py-2 text-sm font-normal shadow-sm transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:outline-none;
&[disabled] {
@apply cursor-not-allowed opacity-(--app-opacity-disabled);
}
}
@@ -0,0 +1,79 @@
.cbi-tooltip {
/* Hidden bubbles park off-screen (bootstrap's `left:-10000px` trick): a
visibility-hidden absolute box left at its anchor still counts into the
page's scrollable overflow, so the horizontal scrollbar would survive the
bubble's disappearance and the page could never snap back. `:hover`
returns it via `inset-s-auto`; the inset isn't transitioned, so the move
is instant while opacity/scale animate. */
@apply bg-surface-overlay text-text border-hairline absolute inset-s-[-10000px] z-110 w-max max-w-xs scale-95 rounded-xl border px-3 py-2 text-xs break-normal whitespace-normal opacity-0 shadow-xl transition-[visibility,opacity,scale] duration-150 ease-out;
&.error {
@apply border-hairline bg-danger-surface text-danger;
}
&.success {
@apply border-hairline bg-success-surface text-success;
}
&.info {
@apply border-hairline bg-info-surface text-info;
}
&.notice {
@apply border-hairline bg-warning-surface text-warning;
}
}
.cbi-tooltip-container,
[data-tooltip] {
@apply relative inline-block cursor-help whitespace-nowrap underline decoration-current decoration-dotted underline-offset-2;
& .cbi-tooltip {
@apply invisible scale-95 opacity-0 transition-[visibility,opacity,scale] duration-150 ease-out;
}
&:hover .cbi-tooltip {
@apply visible scale-100 opacity-100 inset-s-auto;
}
}
/* Generic label tooltip — a CSS-only inverse pill for icon buttons and other
compact controls; any element opts in via attributes:
data-tip="label" tooltip text (empty value renders nothing)
data-tip-pos="left" placement: top (default) | bottom | left | right
Named `data-tip` because `data-tooltip` above is claimed by LuCI's cbi
help bubbles. Show is delayed so cursor sweeps don't flash labels; hide is
immediate. Motion is opacity/scale only (compositor-safe), and hover is
gated to hover-capable pointers so a tap on touch doesn't strand a label —
keyboard focus still shows it everywhere. */
[data-tip]:not([data-tip='']) {
@apply relative;
&::after {
content: attr(data-tip);
@apply bg-text text-bg pointer-events-none absolute z-110 w-max max-w-xs scale-95 rounded-lg px-2 py-1 text-xs break-normal whitespace-normal opacity-0 transition-[opacity,scale] duration-150 ease-out;
}
&:not([data-tip-pos])::after,
&[data-tip-pos='top']::after {
@apply bottom-[calc(100%+0.5rem)] left-1/2 -translate-x-1/2;
}
&[data-tip-pos='bottom']::after {
@apply top-[calc(100%+0.5rem)] left-1/2 -translate-x-1/2;
}
&[data-tip-pos='left']::after {
@apply top-1/2 right-[calc(100%+0.625rem)] -translate-y-1/2;
}
&[data-tip-pos='right']::after {
@apply top-1/2 left-[calc(100%+0.625rem)] -translate-y-1/2;
}
&:focus-visible::after {
@apply scale-100 opacity-100 delay-300;
}
@media (hover: hover) {
&:hover::after {
@apply scale-100 opacity-100 delay-300;
}
}
}