ui: statistics carry no chrome, only spacing

The group had a frame, a surface and a hairline between every cell.  It
now has none of those: a plain responsive grid, transparent, so the
statistics sit on whatever they were dropped onto and take its colour --
the page on the gallery, a Panel on Apps and Status.

That also retires the problem the previous commit went two rounds on.
Ruling the cells needs a technique that survives wrapping, because
`auto-fit` settles the number of rows at paint time: a border per cell
rules columns but not rows, and a border-coloured background behind a 1px
gap rules both but paints every track no cell landed in.  With no rules to
draw, neither case exists.  The gap is wider across than down, since two
statistics side by side have only air between them while stacked ones
already have the label's line.

The margin above the group is conditional on having a sibling before it.
A plain `margin-top` reads correctly under the Header that precedes most
groups, but Apps opens each of its Panels with one, and there it pushed
the values down off the panel's top padding while the bottom stayed put,
leaving every panel lopsided.

Five browser tests described hairlines that no longer exist.  They are
replaced by the claims that now hold -- real space between wrapped rows,
a wider column gap than row gap, transparency and no frame anywhere, and
the conditional margin -- each verified red first: against flush rows for
the spacing, against a background-carried hairline for the transparency,
and against an unconditional margin for the panel case.

Per-theme, the pair to check is no longer the hairline and the surface but
the value and the label: with nothing framing a statistic, the contrast
between those two is the only thing giving it structure.
This commit is contained in:
Roland 2026-07-30 19:17:38 -06:00
parent a2aa1352fb
commit d697265267
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
4 changed files with 145 additions and 105 deletions

View file

@ -865,38 +865,44 @@ html[data-theme="amber"] .wrolpi-card-tag {
}
/*
* The group's hairlines are an outline on each cell, drawn into a 1px grid gap.
* The group is spacing and nothing else: no frame, no rules between cells, and
* no surface of its own, so the statistics sit on whatever they are dropped onto
* -- the page in one place, a Panel in another -- and pick up its colour.
*
* Not a border per cell: a border can only separate the siblings the author can
* count -- the old code suppressed `border-right` on the last child -- and
* `auto-fit` wraps, so the seven statistics on the Docs page became four rows on
* a phone with no rule between them, while the cell ending each earlier row drew
* its border straight onto the outer one.
* That also settles a question this went round twice on. Ruling the cells needs
* a technique that survives wrapping, because `auto-fit` decides the number of
* rows at paint time: a `border-right` per cell rules columns but not rows, and
* a border-coloured background behind a 1px gap rules both but paints every
* track no cell landed in. With no rules at all, neither problem exists.
*
* Nor a border-coloured background behind the gaps, which rules both axes but
* also paints every track no cell landed in: seven statistics in two columns
* left the eighth slot a solid grey block. An outline is drawn outside the
* cell, so it appears only where a cell actually is. Adjacent outlines meet in
* the same 1px of gap, and the outer ones land on the group's own border, all in
* the same colour, so every rule reads as a single hairline.
* The gap is wider across than down. Two statistics side by side have nothing
* between them but air, so they need enough of it not to read as one column of
* text; stacked ones are already separated by the label's line.
*/
.wrolpi-statistic-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1px;
background-color: var(--panel);
border: 1px solid var(--border);
gap: 18px 30px;
}
.wrolpi-statistic-cell {
background-color: var(--panel);
outline: 1px solid var(--border);
padding: 14px 16px;
/*
* With the frame gone there is nothing holding the group off whatever precedes it, and on
* most pages that is a Header -- the first row of values sat directly against the heading.
*
* Only when something does precede it, though. Apps opens each of its Panels with a group,
* and a blanket `margin-top` there pushed the values down off the panel's own top padding
* while leaving the bottom where it was, so the whole panel read as lopsided.
*/
* + .wrolpi-statistic-group {
margin-top: 18px;
}
/*
* A statistic that renders nothing -- Status omits the fan reading on a device
* with no fan connector -- must not leave a padded cell and a hairline behind.
* with no fan connector -- must not hold a track open. The group cannot know in
* advance, since it would have to render the child to find out, so the cell is
* emitted either way and this takes the empty ones back out. It is also why the
* cells carry no inline style: there is nothing here for it to outrank.
*/
.wrolpi-statistic-cell:empty {
display: none;