Stop the ranked charts from spilling over the tables below them
The bars were wrapped in <div class="chart">, and .chart was already the fixed-height box the time-series charts are drawn in: 120px, with a border and a background. A chart that grows a row at a time does not fit in a cage, so the SVG overflowed it and landed on the table underneath. Renamed to .ranked, which is a wrapper rather than the mark itself, and capped at the design width so a wide window scales the box instead of inflating the 12px labels. The test reads the class back out of the markup and checks the stylesheet does not cap it, because the collision was invisible in both files on their own — each rule was reasonable, and only the shared name was wrong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
eb9e9b348c
commit
f8bb78103f
3 files changed
+38
-3
No files matched your search
@@ -164,5 +164,9 @@ select { font: inherit; padding: .35rem .4rem; border: 1px solid var(--line);
|
||||
.tile .v { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
|
||||
.tile .k { font-size: .8rem; color: var(--muted); }
|
||||
.tile svg { display: block; margin-top: .35rem; }
|
||||
.chart { margin: .25rem 0 1rem; }
|
||||
.chart svg { display: block; max-width: 100%; height: auto; }
|
||||
/* Ranked horizontal bars. A wrapper, not the SVG itself: .chart above is the
|
||||
* fixed-height time-series box, and sharing the name gave these a 120px cage
|
||||
* their taller content overflowed, over the table beneath them. Capped at the
|
||||
* design width so scaling up never inflates the 12px labels. */
|
||||
.ranked { margin: .25rem 0 1rem; }
|
||||
.ranked svg { display: block; width: 100%; max-width: 720px; height: auto; }
|
||||
Reference in new issue
Block a user