mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-16 13:33:02 +08:00
140 lines
3.8 KiB
Plaintext
140 lines
3.8 KiB
Plaintext
// out: false
|
|
|
|
// luci-mod-dashboard supplies chart layout; the theme owns its card surfaces.
|
|
// The module loads CSS after the theme, so keep these overrides view-scoped.
|
|
#view > .Dashboard {
|
|
--dashboard-surface-alt: var(--surface-muted);
|
|
--dashboard-text: var(--text-strong);
|
|
--dashboard-text-muted: var(--muted-text);
|
|
--dashboard-border: var(--border-color);
|
|
--dashboard-primary: var(--primary);
|
|
--dashboard-success: var(--success);
|
|
--dashboard-warn: var(--warning);
|
|
|
|
.dashboard-kpi-row > .cbi-section {
|
|
min-width: ~"min(100%, 16rem)";
|
|
padding: var(--field-gap) var(--section-inset);
|
|
gap: var(--field-gap);
|
|
}
|
|
|
|
.dashboard-kpi-text {
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.dashboard-charts > .cbi-section {
|
|
min-width: ~"min(100%, 18rem)";
|
|
padding-block-end: var(--field-gap);
|
|
|
|
// Newer dashboard styles reset chart headings after the theme loads.
|
|
> h3:first-child {
|
|
padding: var(--field-gap) var(--section-inset);
|
|
}
|
|
|
|
// Keep the native full-width heading; inset its chart and legend.
|
|
> :not(h3:first-child) {
|
|
margin-inline: var(--section-inset);
|
|
}
|
|
|
|
> .cbi-section-descr {
|
|
padding: 0;
|
|
margin-block-end: var(--field-gap);
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
> em {
|
|
padding: 0;
|
|
}
|
|
|
|
> .dashboard-legend-inline {
|
|
margin-block-start: var(--field-gap);
|
|
}
|
|
}
|
|
|
|
// Keep numeric chart axes in their native direction within RTL pages.
|
|
.dashboard-bars {
|
|
direction: ltr;
|
|
}
|
|
|
|
.dashboard-net-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(~"min(100%, 16.25rem)", 1fr));
|
|
}
|
|
|
|
.dashboard-net-fields {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.ifacebox {
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.ifacebox-body {
|
|
text-align: start;
|
|
}
|
|
|
|
// Each Internet column wraps its empty hint below the tab's root div.
|
|
[data-tab="internet"] > div > div > em {
|
|
display: block;
|
|
padding: var(--field-gap) var(--section-inset);
|
|
}
|
|
|
|
// The layout editor keeps its actions inside the card, unlike normal pages.
|
|
[data-tab="layout"] .cbi-page-actions {
|
|
padding: var(--field-gap) var(--section-inset);
|
|
}
|
|
|
|
.dashboard-widget-list > .item {
|
|
align-items: flex-start;
|
|
// Dashboard entries support dragging and contain native form controls.
|
|
pointer-events: auto;
|
|
|
|
// Fill the row so the delete button stays at LuCI's right-edge hit area.
|
|
> span {
|
|
flex: 1 1 auto;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.dashboard-widget-settings {
|
|
flex: 1 1 0;
|
|
min-width: 0;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-control) 0 0 var(--radius-control);
|
|
|
|
> summary {
|
|
box-sizing: border-box;
|
|
min-height: calc(2.5rem - 2px);
|
|
padding: .5rem .75rem;
|
|
line-height: 1.5;
|
|
list-style-position: inside;
|
|
overflow-wrap: anywhere;
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: -2px;
|
|
border-radius: inherit;
|
|
}
|
|
}
|
|
|
|
// The item remains LTR because its native delete hit area is physical.
|
|
[dir="rtl"] & {
|
|
direction: rtl;
|
|
}
|
|
}
|
|
|
|
.dashboard-widget-options {
|
|
margin: 0;
|
|
padding: var(--control-gap) .75rem;
|
|
|
|
.cbi-checkbox {
|
|
height: auto;
|
|
min-height: 2.5rem;
|
|
}
|
|
|
|
// Each checkbox is already a flex row; native <br> nodes add empty rows.
|
|
.cbi-checkbox + br {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|