feat(ui,manager): looks: light / dark / device, palettes and styles, chosen in the manager's profile menu (platform-v2 step 6.15)

- @xenia/ui theme.js: a look = mode (light | dark | system) + palette (data-palette) + style (data-style); applyLook /
  getStoredLook (per device), 'system' resolved with matchMedia and followed live, so a palette is just a light and a
  dark token block; applyTheme kept for older callers (keeps palette and style)
- tokens.css: 'Palettes' (first: Nord, light + dark, every colour and the nav rail) and 'Styles' (first: sharp: small
  corners, 1.5px borders, flat cards); --x-border-width used by every component and Tailwind's 'border'
- contrast test: every palette in both modes (+ the nav rail); it caught the default rail's active item at 3.7:1 -> 5.5:1
- manager: the saved look applied at start (was light only); profile menu -> Look: Light / Dark / Device, Colours
  (Xenia, Nord), Shapes (Rounded, Sharp), applied at once and kept on this device
- e2e: manager_look.mjs (every page in light and dark, no large near-white area in dark, contact sheets; 'nord-sharp'
  adds that look; in run-all), manager.mjs 'look:' (dark at once, kept after a reload, Device follows the device)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 00:30:24 +02:00
co-authored by Claude Opus 5.5
parent f383060bad
commit 2b44d55f81
14 changed files with 468 additions and 38 deletions
+6 -6
View File
@@ -26,7 +26,7 @@
display: inline-flex; align-items: center; justify-content: center; gap: var(--x-space-2);
box-sizing: border-box;
min-height: var(--x-control-md); padding: 0 var(--x-space-4);
border: 1px solid transparent; border-radius: var(--x-radius-control);
border: var(--x-border-width) solid transparent; border-radius: var(--x-radius-control);
font: inherit; font-size: var(--x-text-body); line-height: var(--x-leading-body); font-weight: var(--x-weight-semibold);
white-space: nowrap; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
transition: background-color var(--x-duration-fast) var(--x-ease), border-color var(--x-duration-fast) var(--x-ease),
@@ -114,7 +114,7 @@
.x-modal__footer {
display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--x-space-2);
padding: var(--x-space-4) var(--x-space-6);
border-top: 1px solid var(--x-line);
border-top: var(--x-border-width) solid var(--x-line);
}
.x-modal__header + .x-modal__footer { border-top: 0; }
@@ -141,7 +141,7 @@
display: flex; align-items: flex-start; gap: var(--x-space-3);
padding: var(--x-space-3) var(--x-space-2) var(--x-space-3) var(--x-space-4);
background: var(--x-surface); color: var(--x-ink);
border: 1px solid var(--x-line); border-radius: var(--x-radius-card);
border: var(--x-border-width) solid var(--x-line); border-radius: var(--x-radius-card);
box-shadow: var(--x-shadow-popover);
pointer-events: auto;
animation: x-pop-in var(--x-duration-base) var(--x-ease);
@@ -253,7 +253,7 @@
box-sizing: border-box; width: 100%;
min-height: var(--x-control-md); padding: 0 var(--x-space-3);
background: var(--x-surface); color: var(--x-ink);
border: 1px solid var(--x-line-strong); border-radius: var(--x-radius-control);
border: var(--x-border-width) solid var(--x-line-strong); border-radius: var(--x-radius-control);
font: inherit; font-size: var(--x-text-body-lg); /* 16px: phones don't zoom in on focus */
transition: border-color var(--x-duration-fast) var(--x-ease), box-shadow var(--x-duration-fast) var(--x-ease);
}
@@ -276,7 +276,7 @@
.x-stepper__btn {
display: inline-flex; align-items: center; justify-content: center;
width: var(--x-control-md); height: var(--x-control-md); padding: 0;
border: 1px solid var(--x-line-strong); border-radius: var(--x-radius-control);
border: var(--x-border-width) solid var(--x-line-strong); border-radius: var(--x-radius-control);
background: var(--x-surface-2); color: var(--x-ink); cursor: pointer;
transition: background-color var(--x-duration-fast) var(--x-ease);
-webkit-tap-highlight-color: transparent;
@@ -332,5 +332,5 @@
/* ── QR code (QrCode, @xenia/ui/qr; plan step 6.14c) ─────────────────────── */
.x-qr { display: grid; justify-items: center; gap: var(--x-space-2); }
/* always light behind the code, in dark themes too: scanners need the contrast */
.x-qr__tile { padding: var(--x-space-3); border-radius: var(--x-radius-card); border: 1px solid var(--x-line); background: var(--x-on-colour); line-height: 0; }
.x-qr__tile { padding: var(--x-space-3); border-radius: var(--x-radius-card); border: var(--x-border-width) solid var(--x-line); background: var(--x-on-colour); line-height: 0; }
.x-qr__caption { font-size: var(--x-text-label); color: var(--x-ink-2); text-align: center; }