Changed theme to liquid glass

This commit is contained in:
patben8 committed 2026-09-25 14:57:27 +02:00
1 parent 950352f7ec
commit 2810f24563
52 files changed
+1353 -529

No files matched your search

+237 -20
View File
@@ -1,24 +1,81 @@
@import 'tailwindcss';
/* Konduktor design tokens — a dark, deck-friendly palette. */
/* Konduktor design tokens — "dark liquid glass".
Surfaces are translucent layers over a slowly drifting wash of colour
(`AmbientBackdrop`) sampled from the loaded track's cover art. So the ink
scale is no longer a set of opaque greys: 900 → 600 are increasingly strong
WHITE overlays, which read correctly on any glass panel they sit on. Only
`ink-950` stays opaque — it is the dark text on light (accent, mint, gold)
buttons, and the page's base colour. Recessed things (inputs, waveforms,
readouts, progress tracks) use `well`.
Colour is reserved for meaning: cue types, key, the playhead, the one
primary action. Chrome stays neutral. */
@theme {
--color-ink-950: #0a0b0f;
--color-ink-900: #101218;
--color-ink-850: #161922;
--color-ink-800: #1c2029;
--color-ink-700: #262b37;
--color-ink-600: #333a49;
--color-line: #2a2f3b;
--font-sans: 'Geist Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
--font-mono: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
--color-text: #e6e9ef;
--color-muted: #8b93a3;
--color-faint: #5a6172;
--color-ink-950: #05060a;
--color-ink-900: rgb(255 255 255 / 0.03);
--color-ink-850: rgb(255 255 255 / 0.05);
--color-ink-800: rgb(255 255 255 / 0.075);
--color-ink-700: rgb(255 255 255 / 0.11);
--color-ink-600: rgb(255 255 255 / 0.16);
--color-line: rgb(255 255 255 / 0.085);
--color-well: rgb(0 0 0 / 0.32);
--color-accent: #4f8cff;
--color-accent-soft: #2b3a5c;
--color-gold: #ffb020;
--color-mint: #34d399;
--color-pink: #f472b6;
--color-text: #f4f6fb;
--color-muted: rgb(235 240 255 / 0.68);
--color-faint: rgb(235 240 255 / 0.54);
/* The accent follows the cover art's dominant hue at a FIXED lightness and
chroma, so dark text on an accent button always has the same contrast
whatever track is loaded. */
--color-accent: oklch(0.8 0.11 var(--accent-hue));
--color-accent-soft: color-mix(in oklab, var(--color-accent) 20%, transparent);
--color-gold: #ffc861;
--color-mint: #3ddc84;
--color-pink: #ff7a9a;
}
/* Registered so they interpolate: the accent and the backdrop glide to a new
track's colours instead of snapping. */
@property --accent-hue {
syntax: '<number>';
inherits: true;
initial-value: 275;
}
@property --amb-1 {
syntax: '<color>';
inherits: true;
initial-value: #6d4aff;
}
@property --amb-2 {
syntax: '<color>';
inherits: true;
initial-value: #e0409a;
}
@property --amb-3 {
syntax: '<color>';
inherits: true;
initial-value: #12b5c9;
}
@property --amb-4 {
syntax: '<color>';
inherits: true;
initial-value: #2f3fe0;
}
:root {
color-scheme: dark;
--glass-blur: blur(28px) saturate(180%);
transition:
--accent-hue 1.4s ease,
--amb-1 1.8s ease,
--amb-2 1.8s ease,
--amb-3 1.8s ease,
--amb-4 1.8s ease;
}
html,
@@ -31,8 +88,7 @@ body {
margin: 0;
background: var(--color-ink-950);
color: var(--color-text);
font-family:
'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-family: var(--font-sans);
font-feature-settings: 'tnum' 1; /* tabular numbers for BPM columns */
-webkit-font-smoothing: antialiased;
/* An app, not a document: clicks and drags must not paint a text selection.
@@ -48,7 +104,18 @@ textarea,
user-select: text;
}
/* Thin, dark scrollbars that fit the deck aesthetic. */
input::placeholder,
textarea::placeholder {
color: var(--color-faint);
}
/* Native dropdown lists cannot be glass; give them a solid dark ground. */
option {
background: #14161f;
color: var(--color-text);
}
/* Thin, translucent scrollbars that sit on glass. */
* {
scrollbar-width: thin;
scrollbar-color: var(--color-ink-600) transparent;
@@ -64,6 +131,156 @@ textarea,
background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
background: var(--color-ink-700);
background: rgb(255 255 255 / 0.26);
background-clip: padding-box;
}
/* ---- Materials ---------------------------------------------------------
Plain classes rather than utilities: each is a whole material (fill, blur,
rim light, shadow), and the rim needs a pseudo-element. */
@layer components {
/* A floating panel: frosted, tinted dark so text holds contrast over bright
colour, with a light-catching rim.
The blur and the tint live on ::after, NEVER on the element itself: an
element with `backdrop-filter` becomes the containing block for every
`position: fixed` descendant, so a context menu or dialog opened from inside
a panel would be positioned against the panel instead of the window (the
sidebar's playlist menu opened far from the cursor). `isolation` keeps the
z-index:-1 layer behind this panel's content without escaping the panel,
and unlike a filter it does not capture fixed descendants. */
.glass,
.glass-overlay {
position: relative;
isolation: isolate;
border-radius: 22px;
}
.glass {
--glass-tint:
linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.06)),
rgb(12 14 24 / 0.42);
--glass-filter: var(--glass-blur);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.14),
0 30px 80px -30px rgb(0 0 0 / 0.8);
}
/* Menus, dialogs, toasts: denser so they read over busy content beneath. */
.glass-overlay {
--glass-tint:
linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.08)),
rgb(14 16 26 / 0.78);
--glass-filter: blur(40px) saturate(180%);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.16),
0 40px 90px -20px rgb(0 0 0 / 0.9);
}
.glass::after,
.glass-overlay::after {
content: '';
position: absolute;
inset: 0;
z-index: -1;
border-radius: inherit;
pointer-events: none;
background: var(--glass-tint);
backdrop-filter: var(--glass-filter);
-webkit-backdrop-filter: var(--glass-filter);
}
.glass::before,
.glass-overlay::before {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
padding: 1px;
pointer-events: none;
background: linear-gradient(
155deg,
rgb(255 255 255 / 0.42),
rgb(255 255 255 / 0.07) 32%,
rgb(255 255 255 / 0) 58%,
rgb(255 255 255 / 0.14)
);
-webkit-mask:
linear-gradient(#000 0 0) content-box,
linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
}
/* Recessed: waveforms, readouts, the loop-size selector. */
.well {
background: rgb(0 0 0 / 0.36);
box-shadow:
inset 0 2px 6px rgb(0 0 0 / 0.55),
inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
/* A raised glass control. */
.btn-glass {
background: rgb(255 255 255 / 0.07);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.14),
inset 0 0 0 1px rgb(255 255 255 / 0.08);
transition:
background-color 120ms,
box-shadow 120ms,
filter 120ms;
}
.btn-glass:hover:not(:disabled) {
background: rgb(255 255 255 / 0.12);
}
/* THE primary action: a lit pill, white into the accent. One per view. */
.btn-primary {
color: var(--color-ink-950);
background: linear-gradient(180deg, #ffffff 0%, var(--color-accent) 100%);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.9),
inset 0 -2px 6px rgb(0 0 0 / 0.12),
0 10px 26px -8px var(--color-accent);
transition: filter 120ms;
}
.btn-primary:hover:not(:disabled) {
filter: brightness(1.06);
}
/* Selected / toggled-on state for chips and list rows. */
.is-selected {
background: color-mix(in oklab, var(--color-accent) 18%, transparent);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.1),
inset 0 0 0 1px color-mix(in oklab, var(--color-accent) 36%, transparent);
}
}
@media (prefers-reduced-motion: reduce) {
:root {
transition: none;
}
}
/* ---- Ambient backdrop (see AmbientBackdrop.tsx) ------------------------ */
.ambient-wash {
position: absolute;
border-radius: 50%;
will-change: transform;
}
@keyframes drift-a {
from { transform: translate(0, 0) scale(1); }
to { transform: translate(8vw, 6vh) scale(1.12); }
}
@keyframes drift-b {
from { transform: translate(0, 0) scale(1.05); }
to { transform: translate(-9vw, -4vh) scale(0.94); }
}
@keyframes drift-c {
from { transform: translate(0, 0); }
to { transform: translate(5vw, -9vh); }
}
@media (prefers-reduced-motion: reduce) {
.ambient-wash { animation: none !important; }
}