Repository navigation
thold: make legend chips fill their grid cell (fix width leak) - #848
Merged
Merged
Conversation
The legend chips carry both the new .tholdLegendItem class and a legacy state class (.tholdAlert, .deviceUpFull, etc.) that still declares a fixed width (14%/11.11%). The grid rule never set a width, so that legacy width leaked onto the grid items: chips did not stretch to fill their cell and long labels overflowed the coloured box. Give .tholdLegendItem width:100% + box-sizing:border-box + min-width:0 so each chip fills its grid track, keeping the label centred inside the colour boundary.
TheWitness
requested review from
bmfmancini and
xmacan
and
a balanced review from Copilot
October 7, 2026 17:51
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The targeted CSS override consistently resolves the legacy width conflict across all eight themes.
0 open findings
What changed in this PR
Fixes legend chip sizing across all themes by overriding legacy fixed widths.
Changes:
- Makes chips fill their CSS grid cells.
- Includes padding within the assigned width.
- Allows grid items to shrink correctly.
| File | Description |
|---|---|
css/classic.css |
Applies corrected legend sizing. |
css/dark.css |
Applies corrected legend sizing. |
css/deepness.css |
Applies corrected legend sizing. |
css/midwinter.css |
Applies corrected legend sizing. |
css/modern.css |
Applies corrected legend sizing. |
css/paper-plane.css |
Applies corrected legend sizing. |
css/paw.css |
Applies corrected legend sizing. |
css/sunrise.css |
Applies corrected legend sizing. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
xmacan
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #847. The legend chips (Thold, Device status, Log status) were not filling the available width: each chip hugged its text, the row showed large uneven gaps, and multi-word labels (e.g. Baseline Alert) spilled past the coloured background.
Root cause
Every chip
<div>carries two classes — the newtholdLegendItemplus a legacy per-state class (.tholdAlert,.tholdBaseAlert,.deviceUpFull, …). Those legacy classes still declare a fixedwidth: 14%/width: 11.11%, and the new.tholdLegend .tholdLegendItemrule never set a width. So the legacy width leaked onto the grid items and stopped them stretching to fill their1frgrid track, which also left long labels overflowing the colour box.Fix
Give
.tholdLegend .tholdLegendIteman explicit fill:The higher-specificity rule overrides the leaked legacy width, so each chip fills its grid cell. Combined with the existing
--thold-chip-min: calc(<longest>ch + 1.5rem)track floor, every chip is equal width, the label stays centred, and it never exceeds the coloured boundary. Applied identically to all eight theme stylesheets.Types of changes
Checklist