feat(waiter): the look on the shared tokens; the venue's colour (platform-v2 step 4.6)
- The waiter's --bg/--text/--accent… are made of @xenia/ui tokens: light / dark (user menu) and the venue's accent reach every screen; the 751 colour literals in waiter_pwa/src became tokens (by hue family and lightness), hex-alpha suffixes became fade() (color-mix), fixing 'var(--accent)18' tints that never showed. - @xenia/ui: new `special` (violet: offers, discounts, deals; contrast-tested) and `on-colour` tokens. - Setting venue.theme (teal | amber | blue | violet | rose, default amber), bootstrap venue.theme, manager Settings → Venue → Colour; the waiter sets data-venue-theme and the theme before the first render. - Guard tests/no-colours.test.mjs; tests/e2e/waiter_look.mjs (every page light + dark, side-by-side compare page); waiter e2e +3; backend test_venue_theme.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
--x-info-fg-rgb: 255 255 255;
|
||||
--x-info-soft-rgb: 219 234 254;
|
||||
--x-info-ink-rgb: 29 78 216;
|
||||
/* special: offers, discounts, deals (violet; plan step 4.6) */
|
||||
--x-special-rgb: 109 40 217;
|
||||
--x-special-fg-rgb: 255 255 255;
|
||||
--x-special-soft-rgb: 237 233 254;
|
||||
--x-special-ink-rgb: 91 33 182;
|
||||
--x-scrim-rgb: 15 23 42;
|
||||
--x-accent-rgb: 15 118 110;
|
||||
--x-accent-strong-rgb: 17 94 89;
|
||||
@@ -76,6 +81,10 @@
|
||||
--x-info-fg-rgb: 23 37 84;
|
||||
--x-info-soft-rgb: 30 58 138;
|
||||
--x-info-ink-rgb: 191 219 254;
|
||||
--x-special-rgb: 167 139 250;
|
||||
--x-special-fg-rgb: 30 16 64;
|
||||
--x-special-soft-rgb: 59 31 110;
|
||||
--x-special-ink-rgb: 221 214 254;
|
||||
--x-scrim-rgb: 0 0 0;
|
||||
--x-accent-rgb: 45 212 191;
|
||||
--x-accent-strong-rgb: 94 234 212;
|
||||
@@ -110,6 +119,10 @@
|
||||
--x-info-fg-rgb: 23 37 84;
|
||||
--x-info-soft-rgb: 30 58 138;
|
||||
--x-info-ink-rgb: 191 219 254;
|
||||
--x-special-rgb: 167 139 250;
|
||||
--x-special-fg-rgb: 30 16 64;
|
||||
--x-special-soft-rgb: 59 31 110;
|
||||
--x-special-ink-rgb: 221 214 254;
|
||||
--x-scrim-rgb: 0 0 0;
|
||||
--x-accent-rgb: 45 212 191;
|
||||
--x-accent-strong-rgb: 94 234 212;
|
||||
@@ -366,6 +379,10 @@
|
||||
--x-info-fg: rgb(var(--x-info-fg-rgb));
|
||||
--x-info-soft: rgb(var(--x-info-soft-rgb));
|
||||
--x-info-ink: rgb(var(--x-info-ink-rgb));
|
||||
--x-special: rgb(var(--x-special-rgb));
|
||||
--x-special-fg: rgb(var(--x-special-fg-rgb));
|
||||
--x-special-soft: rgb(var(--x-special-soft-rgb));
|
||||
--x-special-ink: rgb(var(--x-special-ink-rgb));
|
||||
--x-scrim: rgb(var(--x-scrim-rgb));
|
||||
--x-accent: rgb(var(--x-accent-rgb));
|
||||
--x-accent-strong: rgb(var(--x-accent-strong-rgb));
|
||||
@@ -373,6 +390,10 @@
|
||||
--x-accent-soft: rgb(var(--x-accent-soft-rgb));
|
||||
--x-accent-ink: rgb(var(--x-accent-ink-rgb));
|
||||
--x-focus-ring: 0 0 0 3px rgb(var(--x-accent-rgb) / 0.35);
|
||||
/* text on a colour the venue chose (a category, a course, a flag) or on a photo: always
|
||||
white, with a shadow where the colour may be light (plan step 4.6) */
|
||||
--x-on-colour-rgb: 255 255 255;
|
||||
--x-on-colour: rgb(var(--x-on-colour-rgb));
|
||||
}
|
||||
|
||||
/* For native controls (select popups, scrollbars) inside @xenia/ui components only.
|
||||
|
||||
Reference in New Issue
Block a user