shell: the active tab's mark and the palette's edge take the theme's accent instead of wayBetter's brush

This commit is contained in:
CRTkafa 2026-10-01 14:14:27 +07:00
parent 49c0569982
commit 62e28c87be
2 changed files with 4 additions and 1 deletions

View file

@ -81,6 +81,8 @@ export function chromeVars(theme: ChromeTheme, own = false): Record<string, stri
'--wb-c-text': text, '--wb-c-text-2': mix(text, muted, 0.4), '--wb-c-muted': muted, '--wb-c-faint': mix(muted, bg, 0.38), '--wb-c-text': text, '--wb-c-text-2': mix(text, muted, 0.4), '--wb-c-muted': muted, '--wb-c-faint': mix(muted, bg, 0.38),
'--wb-c-text-rgb': channels(text), '--wb-c-accent': accent, '--wb-c-accent-rgb': channels(accent), '--wb-c-accent-ink': ink, '--wb-c-text-rgb': channels(text), '--wb-c-accent': accent, '--wb-c-accent-rgb': channels(accent), '--wb-c-accent-ink': ink,
'--wb-c-scheme': dark ? 'dark' : 'light', '--wb-c-scheme': dark ? 'dark' : 'light',
// The chrome's marks (active tab, palette edge) in the theme's accent instead of wayBetter's brush.
'--wb-c-brush': `linear-gradient(90deg, ${accent}, ${accent})`,
...(dark ? {} : { '--wb-c-shadow-pop': `0 18px 44px -14px rgba(${hexToRgb(mix(text, bg, 0.2)).join(', ')}, .28), 0 3px 10px rgba(0, 0, 0, .08)` }), ...(dark ? {} : { '--wb-c-shadow-pop': `0 18px 44px -14px rgba(${hexToRgb(mix(text, bg, 0.2)).join(', ')}, .28), 0 3px 10px rgba(0, 0, 0, .08)` }),
// Panel. // Panel.
'--wb-p-ground': bg, '--wb-p-chrome': mix(bg, surface, 0.5), '--wb-p-card': surface, '--wb-p-field': mix(surface, elevated, 0.5), '--wb-p-raise': elevated, '--wb-p-ground': bg, '--wb-p-chrome': mix(bg, surface, 0.5), '--wb-p-card': surface, '--wb-p-field': mix(surface, elevated, 0.5), '--wb-p-raise': elevated,

View file

@ -23,13 +23,14 @@
/* Radii scale with the theme's corners (chromeVars: --wb-c-rs, the theme radius / 12): every px /* Radii scale with the theme's corners (chromeVars: --wb-c-rs, the theme radius / 12): every px
radius in the chrome is calc(<px> * var(--bt-rs, 1)), so a square theme gets a square window. */ radius in the chrome is calc(<px> * var(--bt-rs, 1)), so a square theme gets a square window. */
--bt-rs: var(--wb-c-rs, 1); --bt-rs: var(--wb-c-rs, 1);
/* The active tab's mark and the palette's edge: wayBetter's brush, or the theme's own accent. */
--bt-brush: var(--wb-c-brush, linear-gradient(90deg, #4f6bff, #22d3ee 55%, #a855f7));
--bt-r1: calc(6px * var(--bt-rs)); --bt-r2: calc(8px * var(--bt-rs)); --bt-r3: calc(10px * var(--bt-rs)); --bt-r4: calc(12px * var(--bt-rs)); --bt-r5: calc(14px * var(--bt-rs)); --bt-r1: calc(6px * var(--bt-rs)); --bt-r2: calc(8px * var(--bt-rs)); --bt-r3: calc(10px * var(--bt-rs)); --bt-r4: calc(12px * var(--bt-rs)); --bt-r5: calc(14px * var(--bt-rs));
color-scheme: var(--wb-c-scheme, dark); color-scheme: var(--wb-c-scheme, dark);
} }
.wb-pane-theme { --bt-bg: var(--bt-ground); --bt-surface: var(--bt-chrome); --bt-surface-2: var(--bt-field); } .wb-pane-theme { --bt-bg: var(--bt-ground); --bt-surface: var(--bt-chrome); --bt-surface-2: var(--bt-field); }
:root { :root {
--bt-danger: #e5484d; --bt-danger: #e5484d;
--bt-brush: linear-gradient(90deg, #4f6bff, #22d3ee 55%, #a855f7);
--bt-s1: 4px; --bt-s2: 8px; --bt-s3: 12px; --bt-s4: 16px; --bt-s5: 24px; --bt-s6: 32px; --bt-s1: 4px; --bt-s2: 8px; --bt-s3: 12px; --bt-s4: 16px; --bt-s5: 24px; --bt-s6: 32px;
--bt-ease: cubic-bezier(.2, .7, .2, 1); --bt-ease-out: cubic-bezier(.16, 1, .3, 1); --bt-ease: cubic-bezier(.2, .7, .2, 1); --bt-ease-out: cubic-bezier(.16, 1, .3, 1);
--bt-t1: 120ms; --bt-t2: 180ms; --bt-t3: 320ms; --bt-t1: 120ms; --bt-t2: 180ms; --bt-t3: 320ms;