mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-09-26 04:54:02 +00:00
Fixes #2004. Two review rounds; findings and evidence on the PR. Verified by injecting the stylesheet into a running deployment and reading computed styles before and after: the badges gain background, size, uppercase and padding; at 430px the Config column stays visible; the sorted column keeps its accent. The new test fails on the eight unstyled classes against the pre-fix tree, on .ns-truncated against the first fix, and on a re-added column-hiding rule.
70 lines
4.5 KiB
CSS
70 lines
4.5 KiB
CSS
/* Node detail — Scopes section. Reuses .analytics-stats / .analytics-stat-card /
|
|
.analytics-time-range from the analytics page (same tokens node-reach.css
|
|
reuses); these are the scopes-specific bits only. No hex/rgb literals —
|
|
--text-muted / --border / --status-* are defined globally. --section-bg is
|
|
NOT: it exists only in the dark-theme blocks (style.css), never in light
|
|
:root, so every use below MUST keep the var(--section-bg, var(--card-bg))
|
|
fallback — the fallback is load-bearing, not decorative. */
|
|
|
|
.ns-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
|
|
.ns-head h4 { margin: 0; }
|
|
.ns-window { margin: 0; }
|
|
|
|
.ns-declared-meta { font-size: 11px; color: var(--text-muted); margin: 0 0 10px; }
|
|
/* Flattened from `.ns-declared-meta .ns-truncated` when this file was ported:
|
|
the Scope Audit renders the marker in its Declared-age cell, with no
|
|
.ns-declared-meta ancestor, so the scoped form styled nothing there. The
|
|
standalone rule covers both callers. */
|
|
.ns-truncated { color: var(--status-amber-text); font-weight: 600; }
|
|
.ns-declared-meta .ns-never-asked { color: var(--text-muted); font-style: italic; }
|
|
|
|
.ns-empty {
|
|
color: var(--text-muted); font-size: 13px; padding: 14px 12px;
|
|
border: 1px dashed var(--border); border-radius: 6px; margin: 6px 0 4px;
|
|
}
|
|
.ns-empty.ns-empty-config { color: var(--status-amber-text); border-color: var(--status-amber-text); }
|
|
|
|
.ns-table { border-collapse: collapse; width: 100%; font-size: 12px; margin: 4px 0 10px; }
|
|
.ns-table th, .ns-table td { border: 0; border-bottom: 1px solid var(--border); padding: 5px 8px; }
|
|
.ns-table thead th { border-bottom: 2px solid var(--border); background: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); text-align: left; }
|
|
/* The rule above is (0,1,2) and outranks the global th.sort-active at (0,1,1)
|
|
whatever the source order, so without this the sorted column label and its
|
|
caret (fill: currentColor) both render muted. Measured on a deployment:
|
|
rgb(74,158,255) before this file loads, rgb(91,99,112) after. Table-scoped,
|
|
the same way .data-table and .analytics-table already solve it. */
|
|
.ns-table thead th.sort-active { color: var(--link-color); }
|
|
.ns-n { text-align: right; font-variant-numeric: tabular-nums; }
|
|
.ns-scope-name { font-family: var(--mono); font-weight: 600; }
|
|
|
|
.ns-decl {
|
|
display: inline-block; padding: 2px 7px; border-radius: var(--badge-radius, 4px);
|
|
font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
|
|
white-space: nowrap;
|
|
}
|
|
.ns-decl-yes { background: color-mix(in srgb, var(--status-green) 16%, transparent); color: var(--status-green-text); }
|
|
.ns-decl-quiet { background: color-mix(in srgb, var(--status-yellow) 18%, transparent); color: var(--status-amber-text); }
|
|
.ns-decl-warn { background: color-mix(in srgb, var(--status-red) 16%, transparent); color: var(--danger); }
|
|
/* The border is load-bearing here and not on its siblings: --section-bg is
|
|
defined only in the dark blocks, so in the light theme this falls back to
|
|
--card-bg, which is white on a near-white page ground. Without the outline
|
|
the "no flood" badge is invisible — the same failure this file is fixing.
|
|
An inset shadow rather than a border so the chip keeps the exact box metrics
|
|
of .ns-decl-yes/-quiet/-warn beside it in the same column. */
|
|
.ns-decl-unknown { background: var(--section-bg, var(--card-bg)); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-muted); font-weight: 600; text-transform: none; }
|
|
|
|
.ns-routes { font-size: 11px; color: var(--text-muted); margin: 0 0 14px; }
|
|
.ns-routes b { color: var(--text); font-variant-numeric: tabular-nums; }
|
|
|
|
.ns-links { font-size: 12px; margin-top: 4px; }
|
|
.ns-links a { color: var(--link-color); }
|
|
|
|
/* The fork this file comes from hides the third column of .ns-table at 480px,
|
|
where .ns-table is the per-node Scopes panel's four-column table and column
|
|
three is "Last seen". That rule is deliberately NOT ported: the only
|
|
.ns-table in this repository is the Scope Audit's, whose third column is
|
|
Config — the badge column this file exists to make visible. Measured at
|
|
430px with the rule in place: the Config header and every badge under it
|
|
computed to display:none. The audit table already scrolls horizontally
|
|
(.sa-table-wrap + .sa-table min-width), so it needs no column hiding. When
|
|
the panel lands here, it should bring a rule scoped to its own table. */
|