Skip to content

dev: make the severity-legend chips fill the row like the thold legend - #395

Merged
TheWitness merged 3 commits into
developfrom
fix/legend-chip-fill-width
Oct 8, 2026
Merged

TheWitness merged 3 commits into
developfrom
fix/legend-chip-fill-width

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

The System/Alert Logs severity legend chips were rendering small instead of filling the row evenly. This mirrors the fix already shipped for the thold legend so syslog matches it.

Root cause

Two bits of CSS the thold legend has were missing from syslog:

  • .syslogLegend .syslogLegendItem never set a width. The chips carry a second per-severity class (logEmergency, logWarning, …); any width those classes pick up keeps each grid item at content size instead of stretching to its 1fr track.
  • .syslogLegendFooter (the wrapper emitted around the legend) had no CSS at all, so it shrink-wrapped rather than spanning the row.

Fix

Mirror the thold legend exactly, across every per-theme css/<theme>.css and the css/legend.css fallback:

  • .syslogLegend .syslogLegendItem → add box-sizing: border-box; width: 100%; min-width: 0;
  • add .syslogLegendFooter { display: table; width: 100%; margin: 8px auto 0; }

CSS-only, scoped to the legend classes. Colors and spacing already live per-theme (and in the neutral legend.css fallback), so nothing else changes.

Files

css/classic.css, css/dark.css, css/deepness.css, css/midwinter.css, css/modern.css, css/paper-plane.css, css/paw.css, css/sunrise.css, css/legend.css, plus a CHANGELOG entry.

The syslog chips rendered small because .syslogLegendItem never set a width,
so a severity class's leaked width kept each grid item at content size, and
the .syslogLegendFooter wrapper had no CSS so it shrink-wrapped. Mirror the
thold fix: add box-sizing/width:100%/min-width:0 to the legend item and a
full-width table rule for the footer, across all per-theme css files and the
legend.css fallback.
@TheWitness
TheWitness requested review from bmfmancini and xmacan and a balanced review from Copilot October 8, 2026 02:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The functional CSS change is scoped and consistent; only optional deduplication remains.

9 open findings
What changed in this PR

Updates severity legends so chips fill grid rows consistently across all themes.

Changes:

  • Adds full-width sizing to legend chips.
  • Applies footer sizing across theme and fallback stylesheets.
  • Documents the change.
File Description
CHANGELOG.md Records the legend layout update.
css/​classic.css Updates classic-theme legend sizing.
css/​dark.css Updates dark-theme legend sizing.
css/​deepness.css Updates deepness-theme legend sizing.
css/​legend.css Updates fallback legend sizing.
css/​midwinter.css Updates midwinter-theme legend sizing.
css/​modern.css Updates modern-theme legend sizing.
css/​paper-plane.css Updates paper-plane-theme legend sizing.
css/​paw.css Updates paw-theme legend sizing.
css/​sunrise.css Updates sunrise-theme legend sizing.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread css/classic.css Outdated
Comment thread css/dark.css Outdated
Comment thread css/deepness.css Outdated
Comment thread css/legend.css Outdated
Comment thread css/midwinter.css Outdated
Comment thread css/modern.css Outdated
Comment thread css/paper-plane.css Outdated
Comment thread css/paw.css Outdated
Comment thread css/sunrise.css Outdated
bmfmancini
bmfmancini previously approved these changes Oct 8, 2026
xmacan
xmacan previously approved these changes Oct 8, 2026
…ntralized in search.css

Addresses PR review: the legend-footer layout rule is already defined identically in css/search.css, which functions.php loads immediately before the selected legend stylesheet. Remove the nine per-palette copies (which could drift) and keep only the chip fill-width change on .syslogLegend .syslogLegendItem.
@TheWitness
TheWitness merged commit 1d27de9 into develop Oct 8, 2026
6 checks passed
@TheWitness
TheWitness deleted the fix/legend-chip-fill-width branch October 8, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants