ui: a progress bar's track is its own edge, not a border

Take the 1px outline off the bar without changing its size.  `box-sizing:
border-box` is global and the declared 1.375rem / 7.5rem were always the outer
box, so nothing moves.

What the border was quietly doing was giving the empty half of the track an
edge, so the track now has to carry that itself: `--head` rather than `--bg`.
A bar sits on a Panel as often as on the page -- Status and Downloads put them
in Panels and table rows, uploads in modals -- and `--bg` is invisible against
one of those two by definition, which is also why light mode needed its own
`--panel` override.  `--head` is off both surfaces in all four themes, and
keeps the label's contrast against the empty track above 4.5:1 everywhere,
which a lighter track (`--border`, 3.4:1 in night) would not.

Asserted per theme in the component spec: no border on any edge, the height
and min-width measured against `rem` rather than px, and the track distinct
from the Panel beneath it.  Putting the border back fails all four.
This commit is contained in:
Roland 2026-08-05 17:10:31 -06:00
parent f30ffe13e0
commit ef5a3a1dbc
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 46 additions and 6 deletions

View file

@ -1160,14 +1160,19 @@ html .mantine-Notification-closeButton:hover {
* `overflow: hidden` is what keeps the indeterminate band inside the bar. Without it the
* band slides from `margin-left: -35%` to `100%` in full view, so the animation ran from
* outside the left edge to outside the right one, painting over whatever sat beside it.
*
* No border: the track is drawn by its own fill instead, so `--head` rather than `--bg`.
* A bar sits on a Panel as often as on the page, and `--bg` is invisible against one of
* those two by definition -- `--head` is off both in every theme. Height and min-width
* are the outer box (`box-sizing: border-box` is global), so dropping the 1px border left
* the bar exactly the size it was.
*/
.wrolpi-progress {
position: relative;
height: 1.375rem;
min-width: 7.5rem;
overflow: hidden;
background: var(--bg);
border: 1px solid var(--border);
background: var(--head);
}
/*
@ -1260,10 +1265,6 @@ html .mantine-Notification-closeButton:hover {
* is lighter than black by definition. Left as it is, deliberately, rather than
* asserted at a threshold chosen to pass.
*/
html[data-theme="light"] .wrolpi-progress {
background: var(--panel);
}
html[data-theme="light"] .wrolpi-progress-fill {
filter: brightness(1.75) saturate(0.55);
}