|
| 1 | +/* |
| 2 | + * Lazurio T3 Code: the design system's light look on a Lazurio Environment (root decision 0200). |
| 3 | + * |
| 4 | + * The Environment's shell (/.lazurio/shell.js, LazurioPlatform F36's addendum of 2026-10-13) |
| 5 | + * declares the design system's tokens (--lz-*) on the document's root and marks it |
| 6 | + * data-lazurio-theme="light". Here they become T3 Code's own raw tokens, for T3 Code's standard |
| 7 | + * look only: no theme picked (no data-theme-id), and light, or dark too where the Environment's |
| 8 | + * theme has a dark variant (root decision 0208: the shell then sets the dark values of the same |
| 9 | + * names under .dark and marks the root data-lazurio-theme-dark). So the standard look is the |
| 10 | + * Environment's theme, chosen in the Launchpad. A theme the person picks, the theme editor's |
| 11 | + * preview and the dark mode of a light-only theme (Lazurio's own) keep T3 Code's palettes, the |
| 12 | + * contrast setting keeps working because T3 derives its --contrast-* tokens from these, and a font |
| 13 | + * chosen in Appearance still wins. Without the shell nothing here matches, and T3 Code looks as |
| 14 | + * upstream. |
| 15 | + * |
| 16 | + * Only raw tokens that index.css declares in the same scope, only --lz-* names the shell promises, |
| 17 | + * no colour literals. scripts/lazurio-release-contract.test.mjs keeps all of it. |
| 18 | + */ |
| 19 | + |
| 20 | +:root[data-lazurio-theme="light"]:not([data-theme-id]):is(:not(.dark), [data-lazurio-theme-dark]) { |
| 21 | + --background: var(--lz-surface); |
| 22 | + --foreground: var(--lz-ink); |
| 23 | + --card: var(--lz-surface); |
| 24 | + --card-foreground: var(--lz-ink); |
| 25 | + --popover: var(--lz-surface); |
| 26 | + --popover-foreground: var(--lz-ink); |
| 27 | + /* Buttons are black. */ |
| 28 | + --primary: var(--lz-accent-button); |
| 29 | + --primary-foreground: var(--lz-on-accent); |
| 30 | + --message-action-hover: var(--lz-accent-button-hover); |
| 31 | + --secondary: var(--lz-gray-50); |
| 32 | + --secondary-foreground: var(--lz-ink); |
| 33 | + --muted: var(--lz-gray-50); |
| 34 | + --muted-foreground: var(--lz-ink-muted); |
| 35 | + /* A selection is a quiet surface one step darker. */ |
| 36 | + --accent: var(--lz-gray-100); |
| 37 | + --accent-foreground: var(--lz-ink); |
| 38 | + --border: var(--lz-line); |
| 39 | + --input: var(--lz-line); |
| 40 | + /* Focus is neutral ink. */ |
| 41 | + --ring: var(--lz-ink); |
| 42 | + --error: var(--lz-red-500); |
| 43 | + --error-foreground: var(--lz-danger); |
| 44 | + --error-surface: var(--lz-danger-bg); |
| 45 | + --warning: var(--lz-warning); |
| 46 | + --warning-foreground: var(--lz-warning); |
| 47 | + --warning-surface: var(--lz-warning-bg); |
| 48 | + --success: var(--lz-green-500); |
| 49 | + --success-foreground: var(--lz-success); |
| 50 | + /* Links and the update notice are the one blue. */ |
| 51 | + --info: var(--lz-accent); |
| 52 | + --info-foreground: var(--lz-info); |
| 53 | + --update: var(--lz-accent); |
| 54 | + --update-foreground: var(--lz-info); |
| 55 | + --sidebar: var(--lz-paper); |
| 56 | + --sidebar-control-surface: var(--lz-gray-100); |
| 57 | + --sidebar-row-hover: var(--lz-gray-50); |
| 58 | + --sidebar-row-active: var(--lz-surface); |
| 59 | + --sidebar-row-selected: var(--lz-gray-100); |
| 60 | + /* The faces come from the shell. */ |
| 61 | + --font-sans: var(--lz-font-sans); |
| 62 | + --font-mono: var(--lz-font-mono); |
| 63 | + --control-radius: var(--lz-radius-sm); |
| 64 | + --surface-grain: none; |
| 65 | +} |
| 66 | + |
| 67 | +/* T3 recomputes its sidebar's palette here; the shell's rail joins this scope, so it reads as one |
| 68 | + paper surface with the sidebar. The switch's active tab (row-active) stays apart from its track |
| 69 | + (control-surface). */ |
| 70 | +:root[data-lazurio-theme="light"]:not([data-theme-id]):is(:not(.dark), [data-lazurio-theme-dark]) |
| 71 | + [data-app-sidebar] { |
| 72 | + --background: var(--lz-paper); |
| 73 | + --foreground: var(--lz-ink); |
| 74 | + --card: var(--lz-surface); |
| 75 | + --card-foreground: var(--lz-ink); |
| 76 | + --accent: var(--lz-gray-100); |
| 77 | + --accent-foreground: var(--lz-ink); |
| 78 | + --muted: var(--lz-gray-50); |
| 79 | + --muted-foreground: var(--lz-ink-muted); |
| 80 | + --border: var(--lz-line); |
| 81 | + --input: var(--lz-line); |
| 82 | + --sidebar: var(--lz-paper); |
| 83 | + --sidebar-foreground: var(--lz-ink); |
| 84 | + --sidebar-muted-foreground: var(--lz-ink-muted); |
| 85 | + --sidebar-control-surface: var(--lz-gray-100); |
| 86 | + --sidebar-row-hover: var(--lz-gray-50); |
| 87 | + --sidebar-row-active: var(--lz-surface); |
| 88 | + --sidebar-row-selected: var(--lz-gray-100); |
| 89 | + --sidebar-border: var(--lz-line); |
| 90 | +} |
| 91 | + |
| 92 | +/* The rail takes the Environment theme's values. The shell declares the design system's tokens on |
| 93 | + each of its own elements (:host), and those declarations hold on the element itself too. The rail |
| 94 | + joins the sidebar's palette scope above, so on the rail that scope would read the design system's |
| 95 | + values, not the theme's, and the rail would stay Lazurio's paper beside a sidebar in another |
| 96 | + theme, in light and dark alike. So the rail inherits the colours a theme sets (LazurioPlatform |
| 97 | + src/shell/contract.ts shellThemeColors) from the document. Outside a theme the document has the |
| 98 | + design system's own values, so nothing changes. */ |
| 99 | +lazurio-rail[data-app-sidebar] { |
| 100 | + --lz-surface: inherit; |
| 101 | + --lz-paper: inherit; |
| 102 | + --lz-ink: inherit; |
| 103 | + --lz-ink-muted: inherit; |
| 104 | + --lz-line: inherit; |
| 105 | + --lz-accent: inherit; |
| 106 | + --lz-accent-button: inherit; |
| 107 | + --lz-accent-button-hover: inherit; |
| 108 | + --lz-on-accent: inherit; |
| 109 | + --lz-gray-50: inherit; |
| 110 | + --lz-gray-100: inherit; |
| 111 | + --lz-red-500: inherit; |
| 112 | + --lz-danger: inherit; |
| 113 | + --lz-danger-bg: inherit; |
| 114 | + --lz-warning: inherit; |
| 115 | + --lz-warning-bg: inherit; |
| 116 | + --lz-green-500: inherit; |
| 117 | + --lz-success: inherit; |
| 118 | + --lz-info: inherit; |
| 119 | + --lz-info-bg: inherit; |
| 120 | +} |