Skip to content

Commit b84e761

Browse files
committed
UI: zebra stripes tint with pane, sit below scrollbar
- Stripes now translucent (`rgba(0,0,0,0.04)` light, `rgba(255,255,255,0.04)` dark), so the pane tint shows through and the stripe row inherits the pane's hue. Old opaque `--color-bg-stripe` covered any underlying tint. - Tinting now actually visible: `.content`'s opaque `--color-bg-primary` was painting over `.file-pane`'s inline tint style. New `--color-pane-bg` CSS var propagates the resolved pane bg (tinted or not) to `.content`, so the bg is visible and stripes composite over it correctly. - Dropped the `@supports not (color-mix)` and `[data-force-old-webkit]` fallback entries for `--color-bg-stripe` — the new rgba value doesn't need a fallback. - Verified `a11y-contrast` row-state matrix still passes across every (mode × tint × variant) combo; the synthesizer already composites non-opaque stripes over the resolved pane bg.
1 parent c1a17bf commit b84e761

2 files changed

Lines changed: 25 additions & 14 deletions

File tree

apps/desktop/src/app.css

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,14 @@
145145
--color-toast-success-bg: #f0fdf4;
146146

147147
/* === Striped rows (zebra striping for file lists) ===
148-
A tiny 4 % mix of `--color-text-primary` into the pane bg. Defined
149-
against an opaque `#ffffff` base (rather than `--color-bg-primary`)
150-
so the value stays stable if `--color-bg-primary` is ever swapped
151-
for a translucent token in the future. */
152-
--color-bg-stripe: color-mix(in oklch, #ffffff, var(--color-text-primary) 4%);
148+
A faint black overlay (~4% alpha) that composites over whatever
149+
pane bg sits beneath. Translucent on purpose: when a pane is
150+
tinted via `appearance.tint{Local,Smb,Mtp}`, the tint shows
151+
through the stripe so the zebra pattern keeps the pane's hue
152+
instead of falling back to a neutral gray. The `row_state_matrix`
153+
a11y synthesizer composites this over the resolved pane bg per
154+
tint, so the WCAG check covers every (tint × mode) combination. */
155+
--color-bg-stripe: rgba(0, 0, 0, 0.04);
153156

154157
/* === Volume tint palette (12 hues + none) ===
155158
The 100% saturated swatches shown in the Settings color picker for
@@ -452,7 +455,6 @@
452455
--color-warning-bg-solid: #f3e5dc;
453456
--color-disk-ok: #74a376;
454457
--color-disk-warning: #e47b42;
455-
--color-bg-stripe: #f6f6f6;
456458
--color-git-portal-subtle: rgba(13, 124, 138, 0.15);
457459
--color-overlay: rgba(0, 0, 0, 0.5);
458460
--color-overlay-light: rgba(0, 0, 0, 0.4);
@@ -484,7 +486,6 @@
484486
--color-warning-bg-solid: #f3e5dc;
485487
--color-disk-ok: #74a376;
486488
--color-disk-warning: #e47b42;
487-
--color-bg-stripe: #f6f6f6;
488489
--color-git-portal-subtle: rgba(13, 124, 138, 0.15);
489490
--color-overlay: rgba(0, 0, 0, 0.5);
490491
--color-overlay-light: rgba(0, 0, 0, 0.4);
@@ -614,10 +615,9 @@
614615
--color-git-portal-subtle: color-mix(in oklch, var(--color-git-portal), transparent 85%);
615616

616617
/* === Striped rows (dark) ===
617-
Same logic as light mode: opaque base so striped rows are a single
618-
layer that replaces the pane's translucent backdrop, not a second
619-
translucent layer that doubles its alpha. */
620-
--color-bg-stripe: color-mix(in oklch, #1e1e1e, var(--color-text-primary) 4%);
618+
Faint white overlay (~4% alpha). Same translucent-on-tint
619+
rationale as light mode: lets the pane tint show through. */
620+
--color-bg-stripe: rgba(255, 255, 255, 0.04);
621621

622622
/* === Search Highlight === */
623623
--color-highlight: rgba(255, 213, 100, 0.9);

apps/desktop/src/lib/file-explorer/pane/FilePane.svelte

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@
23652365
onkeydown={() => {}}
23662366
role="region"
23672367
aria-label="{paneId === 'left' ? 'Left' : 'Right'} file pane"
2368-
style={paneTintBg ? `background-color: ${paneTintBg}` : undefined}
2368+
style={paneTintBg ? `--color-pane-bg: ${paneTintBg}` : undefined}
23692369
data-pane-tint={paneTintName ?? undefined}
23702370
>
23712371
<!-- svelte-ignore a11y_no_static_element_interactions -->
@@ -2582,6 +2582,15 @@
25822582
display: flex;
25832583
flex-direction: column;
25842584
overflow: hidden;
2585+
/* Pane bg propagation hook. The inline style on `.file-pane`
2586+
overrides this with the tinted color when the user picks a
2587+
tint for the volume's kind; otherwise it falls back to the
2588+
untinted base. `.content` reads it so the bg actually paints
2589+
where downstream views can see it (the file-pane itself sits
2590+
behind .content, so an inline `background-color` here was
2591+
invisible). Striped rows use a translucent overlay, so the
2592+
tint shows through them too. */
2593+
--color-pane-bg: var(--color-bg-primary);
25852594
}
25862595
25872596
.header {
@@ -2642,8 +2651,10 @@
26422651
color leaks through. Downstream views (FullList / BriefList /
26432652
ErrorPane / …) keep their interior elements transparent so this
26442653
stays the single base layer. Highlights (selection, cursor) sit
2645-
on top intentionally. */
2646-
background-color: var(--color-bg-primary);
2654+
on top intentionally. `--color-pane-bg` tracks the user's per-volume
2655+
tint (set inline on `.file-pane`); without a tint it resolves
2656+
to `--color-bg-primary`. */
2657+
background-color: var(--color-pane-bg);
26472658
}
26482659
26492660
.error-message {

0 commit comments

Comments
 (0)