zabi-components 8.1.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1011 -0
- package/README.md +1 -1
- package/THEME.md +18 -5
- package/THEMING.md +308 -74
- package/dist/atoms/ActionPanel.svelte +1 -1
- package/dist/atoms/Avatar.svelte +19 -3
- package/dist/atoms/Avatar.svelte.d.ts +12 -0
- package/dist/atoms/Badge.svelte +37 -8
- package/dist/atoms/Badge.svelte.d.ts +6 -0
- package/dist/atoms/Block.svelte +74 -0
- package/dist/atoms/Block.svelte.d.ts +29 -0
- package/dist/atoms/Button.svelte +52 -15
- package/dist/atoms/Button.svelte.d.ts +3 -2
- package/dist/atoms/Card.svelte +181 -25
- package/dist/atoms/Card.svelte.d.ts +55 -3
- package/dist/atoms/Checkbox.svelte +33 -0
- package/dist/atoms/Checkbox.svelte.d.ts +27 -0
- package/dist/atoms/Chip.svelte +351 -0
- package/dist/atoms/Chip.svelte.d.ts +57 -0
- package/dist/atoms/CodeField.svelte +385 -0
- package/dist/atoms/CodeField.svelte.d.ts +61 -0
- package/dist/atoms/ColorPicker.svelte +1 -0
- package/dist/atoms/DateField.svelte +41 -3
- package/dist/atoms/DateField.svelte.d.ts +31 -3
- package/dist/atoms/FloatingActionButton.svelte +5 -3
- package/dist/atoms/FloatingActionButton.svelte.d.ts +1 -1
- package/dist/atoms/Heading.svelte +27 -1
- package/dist/atoms/Heading.svelte.d.ts +7 -0
- package/dist/atoms/IconButton.svelte +81 -9
- package/dist/atoms/IconButton.svelte.d.ts +13 -0
- package/dist/atoms/Input.svelte +10 -5
- package/dist/atoms/Input.svelte.d.ts +3 -2
- package/dist/atoms/List.svelte +3 -2
- package/dist/atoms/ListItem.svelte +31 -7
- package/dist/atoms/ListItem.svelte.d.ts +6 -0
- package/dist/atoms/PickerField.svelte +239 -0
- package/dist/atoms/PickerField.svelte.d.ts +67 -0
- package/dist/atoms/Progress.svelte +78 -17
- package/dist/atoms/Progress.svelte.d.ts +11 -1
- package/dist/atoms/Radio.svelte +32 -0
- package/dist/atoms/Radio.svelte.d.ts +26 -0
- package/dist/atoms/Rating.svelte +132 -6
- package/dist/atoms/Rating.svelte.d.ts +24 -3
- package/dist/atoms/Select.svelte +24 -26
- package/dist/atoms/Select.svelte.d.ts +12 -0
- package/dist/atoms/SelectionControl.svelte +99 -6
- package/dist/atoms/SelectionControl.svelte.d.ts +25 -0
- package/dist/atoms/Skeleton.svelte +114 -18
- package/dist/atoms/Skeleton.svelte.d.ts +30 -3
- package/dist/atoms/SkeletonGroup.svelte +43 -0
- package/dist/atoms/SkeletonGroup.svelte.d.ts +20 -0
- package/dist/atoms/Slider.svelte +35 -0
- package/dist/atoms/Sparkline.svelte +109 -0
- package/dist/atoms/Sparkline.svelte.d.ts +27 -0
- package/dist/atoms/SpeechBubble.svelte +187 -0
- package/dist/atoms/SpeechBubble.svelte.d.ts +33 -0
- package/dist/atoms/Stat.svelte +72 -0
- package/dist/atoms/Stat.svelte.d.ts +19 -0
- package/dist/atoms/TemporalField.svelte +342 -10
- package/dist/atoms/TemporalField.svelte.d.ts +20 -4
- package/dist/atoms/Textarea.svelte +100 -5
- package/dist/atoms/Textarea.svelte.d.ts +21 -0
- package/dist/atoms/TimeColumn.svelte +150 -0
- package/dist/atoms/TimeColumn.svelte.d.ts +25 -0
- package/dist/atoms/TimeField.svelte +46 -3
- package/dist/atoms/TimeField.svelte.d.ts +34 -3
- package/dist/atoms/Toast.svelte +6 -5
- package/dist/atoms/Toggle.svelte +61 -10
- package/dist/atoms/Toggle.svelte.d.ts +15 -0
- package/dist/atoms/Tooltip.svelte +20 -1
- package/dist/atoms/Tooltip.svelte.d.ts +7 -0
- package/dist/atoms/index.d.ts +21 -0
- package/dist/atoms/index.js +17 -0
- package/dist/atoms/selection-control.styles.d.ts +15 -4
- package/dist/atoms/selection-control.styles.js +16 -5
- package/dist/components/atoms/index.d.ts +21 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/atoms/selection-control.styles.d.ts +15 -4
- package/dist/components/atoms/selection-control.styles.d.ts.map +1 -1
- package/dist/components/index.d.ts +27 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/map.d.ts +11 -0
- package/dist/components/map.d.ts.map +1 -0
- package/dist/components/molecules/index.d.ts +7 -2
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/molecules/toast-store.d.ts +30 -0
- package/dist/components/molecules/toast-store.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +6 -1
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/types/variants.d.ts +12 -3
- package/dist/components/types/variants.d.ts.map +1 -1
- package/dist/components/util/app-shell.d.ts +55 -4
- package/dist/components/util/app-shell.d.ts.map +1 -1
- package/dist/components/util/avatar.d.ts +3 -0
- package/dist/components/util/avatar.d.ts.map +1 -1
- package/dist/components/util/bottom-tab-bar.d.ts +6 -0
- package/dist/components/util/bottom-tab-bar.d.ts.map +1 -1
- package/dist/components/util/chart.d.ts +140 -0
- package/dist/components/util/chart.d.ts.map +1 -0
- package/dist/components/util/chip.d.ts +66 -0
- package/dist/components/util/chip.d.ts.map +1 -0
- package/dist/components/util/cn.d.ts.map +1 -1
- package/dist/components/util/code-field.d.ts +63 -0
- package/dist/components/util/code-field.d.ts.map +1 -0
- package/dist/components/util/collapsible.d.ts +6 -0
- package/dist/components/util/collapsible.d.ts.map +1 -1
- package/dist/components/util/display-voice.d.ts +10 -0
- package/dist/components/util/display-voice.d.ts.map +1 -0
- package/dist/components/util/field-control.d.ts +30 -0
- package/dist/components/util/field-control.d.ts.map +1 -0
- package/dist/components/util/field.d.ts +6 -0
- package/dist/components/util/field.d.ts.map +1 -1
- package/dist/components/util/focus-utils.d.ts +2 -0
- package/dist/components/util/focus-utils.d.ts.map +1 -1
- package/dist/components/util/map-view.d.ts +144 -0
- package/dist/components/util/map-view.d.ts.map +1 -0
- package/dist/components/util/photo.d.ts +19 -0
- package/dist/components/util/photo.d.ts.map +1 -1
- package/dist/components/util/progress.d.ts +19 -0
- package/dist/components/util/progress.d.ts.map +1 -0
- package/dist/components/util/scroll-edge.d.ts +33 -0
- package/dist/components/util/scroll-edge.d.ts.map +1 -0
- package/dist/components/util/sheet-drag.d.ts +25 -1
- package/dist/components/util/sheet-drag.d.ts.map +1 -1
- package/dist/components/util/skeleton.d.ts +15 -0
- package/dist/components/util/skeleton.d.ts.map +1 -0
- package/dist/components/util/sliding-indicator.d.ts +25 -0
- package/dist/components/util/sliding-indicator.d.ts.map +1 -0
- package/dist/components/util/temporal-field.d.ts +89 -0
- package/dist/components/util/temporal-field.d.ts.map +1 -0
- package/dist/components/util/toaster.d.ts +40 -0
- package/dist/components/util/toaster.d.ts.map +1 -1
- package/dist/components/util/tone-surface.d.ts +34 -0
- package/dist/components/util/tone-surface.d.ts.map +1 -0
- package/dist/components/util/top-navbar.d.ts +26 -2
- package/dist/components/util/top-navbar.d.ts.map +1 -1
- package/dist/components/util/zabi-strings.d.ts +9 -0
- package/dist/components/util/zabi-strings.d.ts.map +1 -1
- package/dist/create-theme/cli.js +6 -2
- package/dist/create-theme/index.d.ts +17 -3
- package/dist/create-theme/index.js +252 -35
- package/dist/create-theme/lib/resolve.js +97 -0
- package/dist/create-theme/theme-data.js +1618 -90
- package/dist/index.d.ts +27 -3
- package/dist/index.js +18 -0
- package/dist/map.d.ts +10 -0
- package/dist/map.js +9 -0
- package/dist/molecules/Alert.svelte +31 -12
- package/dist/molecules/Alert.svelte.d.ts +12 -1
- package/dist/molecules/AppBar.svelte +287 -28
- package/dist/molecules/AppBar.svelte.d.ts +62 -0
- package/dist/molecules/AvatarGroup.svelte +1 -1
- package/dist/molecules/BarChart.svelte +381 -0
- package/dist/molecules/BarChart.svelte.d.ts +45 -0
- package/dist/molecules/BottomSheet.svelte +88 -20
- package/dist/molecules/BottomSheet.svelte.d.ts +17 -1
- package/dist/molecules/BottomTabBar.svelte +134 -28
- package/dist/molecules/BottomTabBar.svelte.d.ts +36 -2
- package/dist/molecules/Calendar.svelte.d.ts +1 -1
- package/dist/molecules/ChipGroup.svelte +325 -0
- package/dist/molecules/ChipGroup.svelte.d.ts +41 -0
- package/dist/molecules/Collapsible.svelte +158 -54
- package/dist/molecules/Collapsible.svelte.d.ts +23 -6
- package/dist/molecules/CollapsibleGroup.svelte +16 -6
- package/dist/molecules/ConfirmDialog.svelte +5 -1
- package/dist/molecules/ConfirmDialog.svelte.d.ts +3 -0
- package/dist/molecules/Drawer.svelte +33 -12
- package/dist/molecules/Dropdown.svelte +9 -1
- package/dist/molecules/Dropdown.svelte.d.ts +2 -0
- package/dist/molecules/DropdownItem.svelte +1 -1
- package/dist/molecules/ImageUpload.svelte +230 -120
- package/dist/molecules/ImageUpload.svelte.d.ts +38 -3
- package/dist/molecules/LineChart.svelte +459 -0
- package/dist/molecules/LineChart.svelte.d.ts +53 -0
- package/dist/molecules/MapView.svelte +565 -0
- package/dist/molecules/MapView.svelte.d.ts +88 -0
- package/dist/molecules/Modal.svelte +11 -6
- package/dist/molecules/PhotoGrid.svelte +100 -10
- package/dist/molecules/PhotoGrid.svelte.d.ts +11 -0
- package/dist/molecules/PhotoViewer.svelte +121 -24
- package/dist/molecules/PhotoViewer.svelte.d.ts +18 -0
- package/dist/molecules/PieChart.svelte +421 -0
- package/dist/molecules/PieChart.svelte.d.ts +51 -0
- package/dist/molecules/RadioGroup.svelte +20 -4
- package/dist/molecules/RadioGroup.svelte.d.ts +5 -0
- package/dist/molecules/SegmentedControl.svelte +136 -3
- package/dist/molecules/SegmentedControl.svelte.d.ts +6 -0
- package/dist/molecules/SidebarFooter.svelte +1 -1
- package/dist/molecules/SidebarNavSection.svelte +1 -1
- package/dist/molecules/SortableList.svelte +1 -0
- package/dist/molecules/Stepper.svelte +21 -7
- package/dist/molecules/StickyActionBar.svelte +67 -8
- package/dist/molecules/StickyActionBar.svelte.d.ts +14 -1
- package/dist/molecules/Tabs.svelte +79 -2
- package/dist/molecules/Toaster.svelte +171 -7
- package/dist/molecules/Toaster.svelte.d.ts +60 -2
- package/dist/molecules/ToasterToast.svelte +292 -60
- package/dist/molecules/ToasterToast.svelte.d.ts +6 -0
- package/dist/molecules/UnsavedChangesBar.svelte +13 -2
- package/dist/molecules/index.d.ts +7 -2
- package/dist/molecules/index.js +4 -0
- package/dist/molecules/toast-store.d.ts +30 -0
- package/dist/molecules/toast-store.js +4 -1
- package/dist/organisms/AppNavigation.svelte +440 -0
- package/dist/organisms/AppNavigation.svelte.d.ts +72 -0
- package/dist/organisms/AppShell.svelte +539 -39
- package/dist/organisms/AppShell.svelte.d.ts +102 -6
- package/dist/organisms/AppShellHeaderPart.svelte +163 -0
- package/dist/organisms/AppShellHeaderPart.svelte.d.ts +57 -0
- package/dist/organisms/SidebarNavigation.svelte +23 -36
- package/dist/organisms/SidebarPanel.svelte +10 -14
- package/dist/organisms/SidebarPanel.svelte.d.ts +1 -0
- package/dist/organisms/SidebarShell.svelte +2 -3
- package/dist/organisms/TopNavbar.svelte +117 -28
- package/dist/organisms/TopNavbar.svelte.d.ts +22 -1
- package/dist/organisms/TopNavbarSheetContent.svelte +145 -0
- package/dist/organisms/TopNavbarSheetContent.svelte.d.ts +24 -0
- package/dist/organisms/index.d.ts +6 -1
- package/dist/organisms/index.js +4 -0
- package/dist/types/components.d.ts +17 -1
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/index.d.ts +497 -10
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/variants.ts +14 -3
- package/dist/util/app-shell.d.ts +55 -4
- package/dist/util/app-shell.js +32 -7
- package/dist/util/avatar.d.ts +3 -0
- package/dist/util/bottom-tab-bar.d.ts +6 -0
- package/dist/util/chart.d.ts +139 -0
- package/dist/util/chart.js +305 -0
- package/dist/util/chip.d.ts +65 -0
- package/dist/util/chip.js +58 -0
- package/dist/util/cn.js +28 -2
- package/dist/util/code-field.d.ts +62 -0
- package/dist/util/code-field.js +112 -0
- package/dist/util/collapsible.d.ts +6 -0
- package/dist/util/display-voice.d.ts +9 -0
- package/dist/util/display-voice.js +9 -0
- package/dist/util/field-control.d.ts +29 -0
- package/dist/util/field-control.js +32 -0
- package/dist/util/field.d.ts +6 -0
- package/dist/util/focus-utils.d.ts +2 -0
- package/dist/util/focus-utils.js +4 -0
- package/dist/util/map-view.d.ts +143 -0
- package/dist/util/map-view.js +121 -0
- package/dist/util/photo.d.ts +19 -0
- package/dist/util/photo.js +3 -0
- package/dist/util/progress.d.ts +18 -0
- package/dist/util/progress.js +17 -0
- package/dist/util/scroll-edge.d.ts +32 -0
- package/dist/util/scroll-edge.js +87 -0
- package/dist/util/sheet-drag.d.ts +25 -1
- package/dist/util/sheet-drag.js +71 -1
- package/dist/util/skeleton.d.ts +14 -0
- package/dist/util/skeleton.js +22 -0
- package/dist/util/sliding-indicator.d.ts +24 -0
- package/dist/util/sliding-indicator.js +44 -0
- package/dist/util/temporal-field.d.ts +88 -0
- package/dist/util/temporal-field.js +136 -0
- package/dist/util/toaster.d.ts +40 -0
- package/dist/util/toaster.js +55 -0
- package/dist/util/tone-surface.d.ts +33 -0
- package/dist/util/tone-surface.js +35 -0
- package/dist/util/top-navbar.d.ts +26 -2
- package/dist/util/top-navbar.js +23 -0
- package/dist/util/zabi-strings.d.ts +9 -0
- package/dist/zabi-components-colors.css +9 -3
- package/dist/zabi-components-theme-dark-only.css +474 -164
- package/dist/zabi-components-theme-dark.css +474 -164
- package/dist/zabi-components-theme-only.css +933 -99
- package/dist/zabi-components-theme.css +933 -99
- package/dist/zabi-components.css +2275 -321
- package/package.json +11 -1
|
@@ -122,49 +122,70 @@
|
|
|
122
122
|
--color-base-950: var(--zabi-base-50);
|
|
123
123
|
/* Background Colors - No dark mode overrides needed, base colors are already inverted */
|
|
124
124
|
/* Page Colors - No dark mode overrides needed, base colors are already inverted */
|
|
125
|
-
/* Surface elevation — shadows don't read on dark, so
|
|
126
|
-
*
|
|
125
|
+
/* Surface elevation — shadows don't read on dark, so the surfaces carry it by tone, in two
|
|
126
|
+
* steps: page L 21.0, card L 24.1, elevated and overlay L 27.4 (D133/D134).
|
|
127
127
|
*
|
|
128
128
|
* GENERATED by scripts/generate-surfaces.js from tokens/surface-ladder.js — do not hand-edit.
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
129
|
+
* Every role is a plain step of the neutral ramp (--zabi-base-N), so hue and chroma are the
|
|
130
|
+
* ramp's own, and a --zabi-base-* override or a tinted neutral carries all of them. An overlay
|
|
131
|
+
* (sheet, menu, modal) is the same tone as elevated: it is told apart by its edge
|
|
132
|
+
* (--color-material-rim) and its shadow, not by being greyer. The hover on an overlay is one
|
|
133
|
+
* ramp step lighter; the inset is the page step, told apart by its 3:1 edge.
|
|
134
|
+
* With the default greys: #18181b / #1f1f22 / #27272a / #27272a, hover #333338, inset #18181b.
|
|
135
|
+
* Enforced by scripts/check-surface-elevation.js (ramp steps, never lighter downwards, at most
|
|
136
|
+
* two tone steps of 2–5 points, the overlay edge and the card edge). */
|
|
135
137
|
--color-surface-base: var(--zabi-base-900);
|
|
136
|
-
--color-surface-raised:
|
|
137
|
-
--color-surface-elevated:
|
|
138
|
-
--color-surface-overlay:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
--color-surface-raised: var(--zabi-base-850);
|
|
139
|
+
--color-surface-elevated: var(--zabi-base-800);
|
|
140
|
+
--color-surface-overlay: var(--zabi-base-800);
|
|
141
|
+
--color-surface-overlay-hover: var(--zabi-base-750);
|
|
142
|
+
/* Inset — the page step, 3 points below the card (L 24.1). A field on the page is told apart
|
|
143
|
+
* by its 3:1 edge, as a white field on the near-white light page is. */
|
|
144
|
+
--color-surface-inset: var(--zabi-base-900);
|
|
145
|
+
/* Chrome and the bar tokens — restated so a light-only override of the page
|
|
146
|
+
* or the raised surface does not reach dark. */
|
|
147
|
+
--color-surface-chrome: var(--color-surface-base);
|
|
148
|
+
--color-bar: var(--color-surface-chrome);
|
|
149
|
+
--color-bar-border: color-mix(in srgb, var(--color-headline) 10%, transparent);
|
|
150
|
+
--color-bar-brand: var(--color-action-primary);
|
|
151
|
+
--color-tabbar-active: var(--color-nav-menu-active);
|
|
144
152
|
/* Distinct from base, raised AND elevated — a neutral chip has no hue to
|
|
145
|
-
* separate it, so it has to separate on lightness wherever it lands
|
|
153
|
+
* separate it, so it has to separate on lightness wherever it lands:
|
|
154
|
+
* base-300 is 1.70:1 on the page, 1.57:1 on the card, 1.43:1 on elevated. */
|
|
146
155
|
--color-neutral-subtle: var(--color-base-300);
|
|
147
156
|
--color-neutral-border: var(--color-base-200);
|
|
148
157
|
--color-border-overlay: var(--color-base-450);
|
|
149
158
|
/* Background Colors */
|
|
150
159
|
--color-background: var(--color-surface-base);
|
|
151
160
|
--color-background-tertiary: var(--color-base-100);
|
|
152
|
-
/* Page Colors —
|
|
153
|
-
--color-page: var(--color-base
|
|
161
|
+
/* Page Colors — the dark page (base-100 here is --zabi-base-900, the same value as before) */
|
|
162
|
+
--color-page: var(--color-surface-base);
|
|
154
163
|
/* Card Colors — aliases of the surface levels */
|
|
155
164
|
--color-card: var(--color-surface-raised);
|
|
156
165
|
--color-card-hover: var(--color-surface-elevated);
|
|
157
|
-
--color-card-active: var(--color-surface-overlay);
|
|
166
|
+
--color-card-active: var(--color-surface-overlay-hover);
|
|
158
167
|
--color-card-elevated: var(--color-surface-elevated);
|
|
168
|
+
/* Card tint, dark: the brand at 8% over the card (as the status tints of D136,
|
|
169
|
+
* which are 16%: here the field edge sets the ceiling, base-500 is 3.07:1 on
|
|
170
|
+
* this and 2.90:1 at 12%). 8% is #252733: 1.11:1 on the card and 1.20:1 on the
|
|
171
|
+
* page; headline 13.49, body 11.68, label and description 10.03, caption 7.68,
|
|
172
|
+
* link 8.81, ring 6.59:1. */
|
|
173
|
+
--color-card-tint: color-mix(in srgb, var(--zabi-brand-500) 8%, var(--color-surface-raised));
|
|
174
|
+
/* Card variant="flat", dark: a translucent step of the neutral ramp (base-50 at 7%), so a flat card
|
|
175
|
+
* is lighter than whatever it sits on, and a flat card inside a flat card is lighter again. Shadows
|
|
176
|
+
* do not carry layers on a dark page; alpha does. Hover and pressed are the same step at 11% and 15%.
|
|
177
|
+
* Restore the opaque fill: overrides: { dark: { '--color-card-flat': 'var(--color-card)' } }. */
|
|
178
|
+
--color-card-flat: color-mix(in srgb, var(--zabi-base-50) 7%, transparent);
|
|
179
|
+
--color-card-flat-hover: color-mix(in srgb, var(--zabi-base-50) 11%, transparent);
|
|
180
|
+
--color-card-flat-active: color-mix(in srgb, var(--zabi-base-50) 15%, transparent);
|
|
159
181
|
/* Surfaces — numbered aliases of the surface levels */
|
|
160
182
|
--color-surface-1: var(--color-surface-raised);
|
|
161
183
|
--color-surface-2: var(--color-surface-elevated);
|
|
162
184
|
--color-surface-3: var(--color-surface-overlay);
|
|
163
|
-
--color-surface-4: var(--color-
|
|
185
|
+
--color-surface-4: var(--color-surface-overlay-hover);
|
|
164
186
|
/*
|
|
165
|
-
* Secondary text keeps ≥ 4.5:1 on every surface level, including overlays (
|
|
166
|
-
*
|
|
167
|
-
* moves one step up to base-700 to stay visibly stronger than caption.
|
|
187
|
+
* Secondary text keeps ≥ 4.5:1 on every surface level, including overlays (L27).
|
|
188
|
+
* Caption takes base-650 and description base-700 to stay visibly stronger than it.
|
|
168
189
|
*/
|
|
169
190
|
--color-description: var(--color-base-700);
|
|
170
191
|
--color-caption: var(--color-base-650);
|
|
@@ -176,28 +197,87 @@
|
|
|
176
197
|
/* Overlay Colors */
|
|
177
198
|
--color-overlay: rgba(0, 0, 0, 0.7);
|
|
178
199
|
/* Input Colors
|
|
179
|
-
* Dark fields are
|
|
180
|
-
*
|
|
181
|
-
|
|
200
|
+
* Dark fields are a translucent step of the neutral ramp (base-50 at 7%), the
|
|
201
|
+
* same idea as the flat card: a well one step LIGHTER than whatever it sits on,
|
|
202
|
+
* without a rule per surface. It was the page step (--color-surface-inset), so
|
|
203
|
+
* a dark form was told from the page by its 3:1 edge alone. 7% is 1.20:1 on
|
|
204
|
+
* the page (#28282b), 1.22:1 on a card (#2e2e31) and 1.23:1 on the overlay
|
|
205
|
+
* (#363639); hover 10% and pressed 15% (1.30:1 against the resting field on
|
|
206
|
+
* all three). The edge below stays 3:1 against the surface outside it.
|
|
207
|
+
* Restore the opaque field: overrides: { dark: {
|
|
208
|
+
* '--color-input': 'var(--color-surface-inset)', '--color-input-hover': 'var(--color-base-200)',
|
|
209
|
+
* '--color-input-focus': 'var(--color-base-150)',
|
|
210
|
+
* '--color-input-active': 'color-mix(in srgb, var(--zabi-base-50) 10%, var(--color-surface-inset))' } }. */
|
|
211
|
+
--color-input: color-mix(in srgb, var(--zabi-base-50) 7%, transparent);
|
|
212
|
+
/* What a field is inside a colour block (.on-brand, .on-accent, .on-fill): the translucent
|
|
213
|
+
* well would sit on the block's fill, which the theme's text is not set for, so the field
|
|
214
|
+
* takes these opaque steps there. */
|
|
215
|
+
--color-input-solid: var(--color-surface-inset);
|
|
216
|
+
--color-input-solid-hover: var(--color-base-200);
|
|
217
|
+
--color-input-solid-focus: var(--color-base-150);
|
|
218
|
+
--color-input-solid-active: color-mix(in srgb, var(--zabi-base-50) 10%, var(--color-surface-inset));
|
|
182
219
|
/* Restated here: the root value of a var() alias is resolved at :root. */
|
|
183
220
|
--color-progress-fill: var(--color-action-primary);
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
*
|
|
221
|
+
/* The field step is the page now, so the track takes its own: base-75
|
|
222
|
+
* (#101013), a well just below the page: 1.06:1 on the page, 1.14:1 on the
|
|
223
|
+
* card, 1.45:1 on the elevated surface. It was base-250 (#333338, 1.41:1 on
|
|
224
|
+
* the page). The fill is a mid step now (brand-600), and 3:1 on its rail
|
|
225
|
+
* needs a track this dark: 3.91:1 here with the default brand (2.59:1 on
|
|
226
|
+
* base-250, 2.94:1 for an amber brand on base-200). */
|
|
227
|
+
--color-progress-track: var(--color-base-75);
|
|
228
|
+
/* Restated: the root value of a var() alias is resolved at :root. The field
|
|
229
|
+
* edge, 3.67:1 on the page and 3.40:1 on the card. */
|
|
230
|
+
--color-progress-track-border: var(--color-input-border);
|
|
231
|
+
/* base-500 (the mirror's fixed point): 3.67:1 on the dark field and the page,
|
|
232
|
+
* 3.40:1 on the card, 3.08:1 on the elevated surface and the overlay.
|
|
233
|
+
* base-300 was 1.70, 1.57 and 1.43. */
|
|
187
234
|
--color-input-border: var(--color-base-500);
|
|
188
235
|
--color-input-border-hover: var(--color-input-border);
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
*
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
--color-
|
|
236
|
+
/* The decorative hairline (Card's default variant, list dividers). Quiet, like
|
|
237
|
+
* light's: base-250 is #333338, 1.41:1 on the page and 1.31:1 on the card
|
|
238
|
+
* (base-300 was 1.70 and 1.57, base-200 only 1.10 on the card). Restated: the
|
|
239
|
+
* root value of a var() alias is resolved at :root. -medium (2.29:1) and
|
|
240
|
+
* -strong (3.67:1) keep their order above it. */
|
|
241
|
+
--color-border: var(--color-base-250);
|
|
242
|
+
--color-border-weak: var(--color-base-250);
|
|
243
|
+
/* Toggle track, off. The thumb is the card (#1f1f22), so the track cannot
|
|
244
|
+
* be as dark as it. base-300 (#3f3f46) is 1.57:1 against the thumb, and the
|
|
245
|
+
* field edge gives the 3:1: 3.67:1 on the page, 3.40:1 on the card. */
|
|
246
|
+
--color-toggle-track: var(--color-base-300);
|
|
247
|
+
--color-toggle-track-hover: var(--color-base-350);
|
|
248
|
+
--color-toggle-track-active: var(--color-base-400);
|
|
249
|
+
--color-toggle-track-border: var(--color-input-border);
|
|
250
|
+
/* Toggle knob in dark: off, a light knob on the dark track (base-700, #d4d4d8:
|
|
251
|
+
* 7.07:1 resting, 5.23:1 pressed); on, as in light (the same 4.86:1 and up). */
|
|
252
|
+
--color-toggle-knob: var(--color-base-700);
|
|
253
|
+
--color-toggle-knob-checked: var(--color-action-primary-text);
|
|
254
|
+
/* Hover 10%: 1.10:1 above the resting well on the page, the card and the overlay, body 8.65:1
|
|
255
|
+
* or more and placeholder 4.68:1 or more on it. Was base-200. */
|
|
256
|
+
--color-input-hover: color-mix(in srgb, var(--zabi-base-50) 10%, transparent);
|
|
257
|
+
/* Pressed 15% of the light end of the ramp (unmirrored, --zabi-base-50): 1.30:1 against the
|
|
258
|
+
* resting well on the page (#3a3a3c), the card (#404042) and the overlay (#474749), 1.18:1
|
|
259
|
+
* past hover, body 7.34:1 or more, placeholder 4.54:1 on a card and 4.08:1 on the overlay,
|
|
260
|
+
* short of the border (2.35:1 or less). 14% is 1.254:1 on the default and under 1.25 on a tinted ramp. Was 10% into the page step (#2f2f31). */
|
|
261
|
+
--color-input-active: color-mix(in srgb, var(--zabi-base-50) 15%, transparent);
|
|
262
|
+
/* Focus is the resting well: the ring shows focus, and hover still reads on a focused field.
|
|
263
|
+
* Was base-150. */
|
|
264
|
+
--color-input-focus: color-mix(in srgb, var(--zabi-base-50) 7%, transparent);
|
|
265
|
+
/* The field is the page step now, so the disabled field goes one step below
|
|
266
|
+
* the page (base-75, #101013): 1.07:1 on the page, 1.16:1 on the card. */
|
|
267
|
+
--color-input-disabled: var(--color-base-75);
|
|
195
268
|
/* base-500 is the mirror's fixed point, the same grey as it was in light,
|
|
196
269
|
* and a dark field is a far lighter ground for it than a white one is dark:
|
|
197
270
|
* 3.40:1 at rest, 3.08:1 on hover, 2.60:1 pressed. base-600 mirrors to
|
|
198
271
|
* --zabi-base-400 (#a1a1aa): 6.41, 5.81 and 4.90. base-550 would be 4.74
|
|
199
|
-
* at rest but under 4.5 on hover. The value text is 2.0:1 stronger.
|
|
200
|
-
|
|
272
|
+
* at rest but under 4.5 on hover. The value text is 2.0:1 stronger.
|
|
273
|
+
* The well is lighter now (a translucent step over the surface), and the
|
|
274
|
+
* pressed one over a card held base-400 to 4.04:1: so 40% of the next step
|
|
275
|
+
* toward the value (base-350, #babac1) is mixed in, #ababb3: 6.46, 5.89 and
|
|
276
|
+
* 4.98:1 at rest, hover and pressed on the page, 5.91, 5.37 and 4.54:1 on a
|
|
277
|
+
* card, 5.30, 4.82 and 4.08:1 on the overlay (pressed there is held to 4:1,
|
|
278
|
+
* see contrast-pairs.js), and 1.80:1 under the value (1.75 is the floor; 50%
|
|
279
|
+
* would be 1.75). Was base-600 (#a1a1aa). */
|
|
280
|
+
--color-input-placeholder: color-mix(in srgb, var(--zabi-base-350) 40%, var(--zabi-base-400));
|
|
201
281
|
/* Text Colors - No dark mode overrides needed, base colors are already inverted */
|
|
202
282
|
/* Border Colors - the decorative edges need no override, base colors are
|
|
203
283
|
* already inverted. The control boundary does: base-500 is the mirror's
|
|
@@ -206,6 +286,14 @@
|
|
|
206
286
|
* mirrors to --zabi-base-400 (#a1a1aa): 3.73:1 on the overlay, the lightest
|
|
207
287
|
* surface, and more on every level below it. base-550 is 2.76:1 there. */
|
|
208
288
|
--color-control-border: var(--color-base-600);
|
|
289
|
+
/* Segmented control thumb — restated: the aliases resolve at :root, so without
|
|
290
|
+
* these dark would keep the light card colour. The track is a light tint over
|
|
291
|
+
* the page or a card (#2c2c2f / #333335), which the overlay tone now sits
|
|
292
|
+
* below, so the thumb takes base-400 (#52525b): 1.80:1 over the page track,
|
|
293
|
+
* 1.63:1 over the card track, headline text 7.03:1. */
|
|
294
|
+
--color-segment-thumb: var(--color-base-400);
|
|
295
|
+
--color-segment-thumb-text: var(--color-headline);
|
|
296
|
+
--color-segment-thumb-border: var(--color-control-border);
|
|
209
297
|
/* Focus Colors — the same steps as light, through the mirror: brand-600 is
|
|
210
298
|
* --zabi-brand-400 here, which is also the dark primary fill, so on a
|
|
211
299
|
* primary button the ring is separated by its offset gap exactly as in light.
|
|
@@ -223,25 +311,28 @@
|
|
|
223
311
|
--color-focus-ring-muted: var(--color-base-600);
|
|
224
312
|
/* Primary Colors - No dark mode overrides needed, brand colors are already inverted */
|
|
225
313
|
/* Secondary Colors - No dark mode overrides needed, base colors are already inverted */
|
|
226
|
-
/* Tinted fills and edges —
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
--color-
|
|
235
|
-
--color-
|
|
236
|
-
--color-
|
|
237
|
-
--color-
|
|
238
|
-
--color-
|
|
239
|
-
--color-
|
|
240
|
-
--color-
|
|
314
|
+
/* Tinted fills and edges — the hue thinned into the card surface, not the
|
|
315
|
+
* mirrored step 100 / 200 (physical 900 / 800: deep, saturated, the loudest
|
|
316
|
+
* area on a dark screen). A tint here is a low-chroma tint of the card, and
|
|
317
|
+
* the hue is carried by the icon and the text. The mid step (500) is where
|
|
318
|
+
* the ramp's chroma peaks and the mirror's fixed point. The base is the card
|
|
319
|
+
* surface, so a badge or alert on a card is never darker than the card, and
|
|
320
|
+
* an app's override of the card surface carries through. The edge is the
|
|
321
|
+
* same mix, stronger. */
|
|
322
|
+
--color-success-subtle: color-mix(in srgb, var(--zabi-pine-500) 16%, var(--color-surface-raised));
|
|
323
|
+
--color-success-border: color-mix(in srgb, var(--zabi-pine-500) 36%, var(--color-surface-raised));
|
|
324
|
+
--color-warning-subtle: color-mix(in srgb, var(--zabi-warning-500) 16%, var(--color-surface-raised));
|
|
325
|
+
--color-warning-border: color-mix(in srgb, var(--zabi-warning-500) 36%, var(--color-surface-raised));
|
|
326
|
+
--color-error-subtle: color-mix(in srgb, var(--zabi-error-500) 16%, var(--color-surface-raised));
|
|
327
|
+
--color-error-border: color-mix(in srgb, var(--zabi-error-500) 36%, var(--color-surface-raised));
|
|
328
|
+
--color-energetic-subtle: color-mix(in srgb, var(--zabi-citron-500) 16%, var(--color-surface-raised));
|
|
329
|
+
--color-energetic-border: color-mix(in srgb, var(--zabi-citron-500) 36%, var(--color-surface-raised));
|
|
330
|
+
--color-accent-subtle: color-mix(in srgb, var(--zabi-accent-500) 16%, var(--color-surface-raised));
|
|
331
|
+
--color-accent-border: color-mix(in srgb, var(--zabi-accent-500) 36%, var(--color-surface-raised));
|
|
241
332
|
/* Label on a solid accent fill: the dark end of the ramp on its light end. */
|
|
242
333
|
--color-on-accent: var(--zabi-on-accent-dark);
|
|
243
|
-
--color-info-subtle: var(--
|
|
244
|
-
--color-info-border: var(--
|
|
334
|
+
--color-info-subtle: color-mix(in srgb, var(--zabi-iris-500) 16%, var(--color-surface-raised));
|
|
335
|
+
--color-info-border: color-mix(in srgb, var(--zabi-iris-500) 36%, var(--color-surface-raised));
|
|
245
336
|
/* Neutral Colors — base-550 mirrors to L* 57, which is only 4.35:1 on a
|
|
246
337
|
* raised surface. One step lighter clears AA on every dark surface level. */
|
|
247
338
|
--color-neutral: var(--color-base-600);
|
|
@@ -249,48 +340,112 @@
|
|
|
249
340
|
/* ========================================
|
|
250
341
|
ACTION COLORS - Dark Mode Overrides
|
|
251
342
|
======================================== */
|
|
252
|
-
/* Primary Actions -
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
343
|
+
/* Primary Actions - the brand hue in dark too: the same physical steps as
|
|
344
|
+
* light (600 / 700 / 800), not the mirrored ones, which would be the pale
|
|
345
|
+
* 400 / 300 / 200. White on step 600 is 4.76 to 4.86:1 (every ramp is on one
|
|
346
|
+
* lightness curve); with the default brand the fill is 3.65:1 on the page,
|
|
347
|
+
* 3.39:1 on the card and 3.07:1 on the overlay (3:1 holds on all three, WCAG
|
|
348
|
+
* 1.4.11). Hover and pressed go darker, as in light.
|
|
349
|
+
* createTheme({ darkPrimary: 'mirror' }) writes the mirrored fills instead.
|
|
350
|
+
* 🎯 TO CHANGE bg-action-primary IN DARK MODE: override --color-action-primary under `dark`. */
|
|
351
|
+
--color-action-primary: var(--zabi-brand-600);
|
|
352
|
+
--color-action-primary-hover: var(--zabi-brand-700);
|
|
353
|
+
--color-action-primary-active: var(--zabi-brand-800);
|
|
354
|
+
/* "On brand" in dark: --zabi-on-brand-dark, which follows the light label (white). If an app
|
|
355
|
+
* moves the dark primary to a pale step, it sets the knob to a dark one.
|
|
356
|
+
* --color-action-primary-text is restated, as it always was here, so that an
|
|
357
|
+
* app's light-only override of it does not carry a different label onto the
|
|
358
|
+
* dark fill. */
|
|
259
359
|
--color-on-brand: var(--zabi-on-brand-dark);
|
|
260
360
|
--color-action-primary-text: var(--color-on-brand);
|
|
261
361
|
/* Pinned like the other tints: light moved these a step darker. */
|
|
262
362
|
--color-action-primary-subtle: var(--color-brand-100);
|
|
263
363
|
--color-action-primary-subtle-hover: var(--color-brand-200);
|
|
364
|
+
--color-action-primary-border: var(--color-brand-200);
|
|
264
365
|
/* Half a step past the dark hover fill, as in light. */
|
|
265
366
|
--color-action-primary-subtle-active: color-mix(in srgb, var(--color-brand-300) 50%, var(--color-brand-200));
|
|
266
367
|
/* Secondary Actions - light alpha tint instead of the light-mode dark tint */
|
|
267
368
|
--color-action-secondary: rgba(250, 250, 250, 0.09);
|
|
268
369
|
--color-action-secondary-hover: rgba(250, 250, 250, 0.15);
|
|
269
370
|
--color-action-secondary-active: rgba(250, 250, 250, 0.21);
|
|
270
|
-
/*
|
|
371
|
+
/* Tonal Actions - the deep brand tint (brand-100 in dark is the deep end of
|
|
372
|
+
* the mirrored ramp) with a light brand label. Restated: the root values are
|
|
373
|
+
* var() aliases of roles that move in dark. Brand-800 is the light end of the
|
|
374
|
+
* mirrored ramp here: 9.48, 6.94 and 5.86:1 on the three fills. */
|
|
375
|
+
--color-action-tonal: var(--color-action-primary-subtle);
|
|
376
|
+
--color-action-tonal-hover: var(--color-action-primary-subtle-hover);
|
|
377
|
+
--color-action-tonal-active: color-mix(in srgb, var(--color-brand-300) 50%, var(--color-brand-200));
|
|
378
|
+
--color-action-tonal-text: var(--color-brand-800);
|
|
379
|
+
/* Chip, dark - its own steps, not the mirror of light. The ladder rises from
|
|
380
|
+
* the page (base-900, card base-850): rest base-750 is 1.41:1 on the page and
|
|
381
|
+
* 1.31:1 on the card, hover base-700 and pressed base-650 lighter again (1.70
|
|
382
|
+
* and 1.96 on the page). Headline is 11.43, 9.50 and 8.24:1 on the three.
|
|
383
|
+
* Restated, with the selected chip, because the root values are var() aliases. */
|
|
384
|
+
--color-chip: var(--zabi-base-750);
|
|
385
|
+
--color-chip-hover: var(--zabi-base-700);
|
|
386
|
+
--color-chip-active: var(--zabi-base-650);
|
|
387
|
+
--color-chip-text: var(--color-headline);
|
|
388
|
+
--color-chip-selected: var(--color-action-tonal);
|
|
389
|
+
--color-chip-selected-hover: var(--color-action-tonal-hover);
|
|
390
|
+
--color-chip-selected-active: var(--color-action-tonal-active);
|
|
391
|
+
--color-chip-selected-text: var(--color-action-tonal-text);
|
|
392
|
+
/* Outline Actions - the field edge, restated for the same reason. */
|
|
393
|
+
--color-action-outline-border: var(--color-input-border);
|
|
394
|
+
--color-action-outline-border-hover: var(--color-input-border-hover);
|
|
395
|
+
/* Disabled Actions - base-200 in dark is #27272a (the elevated tone), still
|
|
396
|
+
* the quietest fill, and the one the disabled label (base-500) reads on at 3.08:1.
|
|
271
397
|
* Pinned: light moved a step darker to stay visible on its darker page. */
|
|
272
398
|
--color-action-disabled: var(--color-base-200);
|
|
273
399
|
--color-action-disabled-border: var(--color-base-250);
|
|
274
|
-
/* Danger Actions —
|
|
275
|
-
*
|
|
276
|
-
* is
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
|
|
281
|
-
--color-action-danger: var(--
|
|
282
|
-
--color-action-danger-
|
|
283
|
-
--color-action-danger-
|
|
284
|
-
--color-action-danger-subtle: var(--
|
|
285
|
-
--color-action-danger-subtle-
|
|
286
|
-
--color-action-danger-text: var(--
|
|
287
|
-
/* Shadow Colors — black, not the light theme's ink tint
|
|
400
|
+
/* Danger Actions — the same physical steps as light danger (600 / 700 / 800
|
|
401
|
+
* of --zabi-error-*) with the same label (step 50), so a destructive button
|
|
402
|
+
* is one red in both modes and shares the primary's veil. Physical, not
|
|
403
|
+
* through the mirror, which would be the pale 400 / 300 / 200. Restated
|
|
404
|
+
* because `zabi-components/theme-dark-only` has to stand alone as a complete
|
|
405
|
+
* import (validate-theme.js enforces that). The subtle tints are the thin mix below. */
|
|
406
|
+
--color-action-danger: var(--zabi-error-600);
|
|
407
|
+
--color-action-danger-hover: var(--zabi-error-700);
|
|
408
|
+
--color-action-danger-active: var(--zabi-error-800);
|
|
409
|
+
--color-action-danger-subtle: var(--color-error-subtle);
|
|
410
|
+
--color-action-danger-subtle-hover: color-mix(in srgb, var(--zabi-error-500) 20%, var(--color-surface-raised));
|
|
411
|
+
--color-action-danger-subtle-active: color-mix(in srgb, var(--zabi-error-500) 32%, var(--color-surface-raised));
|
|
412
|
+
--color-action-danger-text: var(--zabi-error-50);
|
|
413
|
+
/* Shadow Colors — black, not the light theme's ink tint. Much stronger than
|
|
414
|
+
* light (0.1 / 0.06): an overlay is the same tone as the elevated surface
|
|
415
|
+
* now, so a sheet (L 27.4) floats over a card (L 24.1) by its shadow and its
|
|
416
|
+
* edge, and the shadow has to carry it. */
|
|
288
417
|
--shadow-color: 0 0 0;
|
|
289
|
-
--shadow-opacity: 0.
|
|
290
|
-
--shadow-
|
|
291
|
-
--shadow-
|
|
292
|
-
--shadow-
|
|
293
|
-
--shadow-
|
|
418
|
+
--shadow-opacity: 0.5;
|
|
419
|
+
--shadow-opacity-contact: 0.4;
|
|
420
|
+
--shadow-sm: 0 1px 2px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 2px 6px -1px rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
421
|
+
--shadow-md: 0 1px 3px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 6px 14px -2px rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
422
|
+
--shadow-lg: 0 1px 2px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 10px 30px 0 rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
423
|
+
--shadow-xl: 0 2px 4px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 20px 50px -8px rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
424
|
+
--shadow-material: 0 1px 2px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 10px 30px 0 rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
425
|
+
/* Materials — the alphas and the backdrop brightness differ (see @theme).
|
|
426
|
+
* The fills are not restated: they follow the surface tokens above. The
|
|
427
|
+
* filters are restated, because they hold a var() that resolves where it is
|
|
428
|
+
* declared; the fallbacks below are one class more specific than this rule
|
|
429
|
+
* and set them to none, so they still win in dark. */
|
|
430
|
+
--material-backdrop-brightness: 0.6;
|
|
431
|
+
--material-alpha-thin: 60%;
|
|
432
|
+
--material-alpha-regular: 68%;
|
|
433
|
+
--material-alpha-thick: 72%;
|
|
434
|
+
--material-filter-thin: blur(var(--material-blur-thin)) saturate(var(--material-saturate)) brightness(var(--material-backdrop-brightness));
|
|
435
|
+
--material-filter-regular: blur(var(--material-blur-regular)) saturate(var(--material-saturate)) brightness(var(--material-backdrop-brightness));
|
|
436
|
+
--material-filter-thick: blur(var(--material-blur-thick)) saturate(var(--material-saturate)) brightness(var(--material-backdrop-brightness));
|
|
437
|
+
--color-material-highlight: color-mix(in srgb, var(--zabi-base-50) 14%, transparent);
|
|
438
|
+
--color-material-rim: color-mix(in srgb, var(--zabi-base-50) 14%, transparent);
|
|
439
|
+
/* Gradients: the wash is quieter in dark (see @theme). The stops follow. */
|
|
440
|
+
--gradient-canvas-strength: 25%;
|
|
441
|
+
--gradient-control-top-strength: 0%;
|
|
442
|
+
--gradient-control-bottom-strength: 14%;
|
|
443
|
+
/* The accent's own strengths, no longer the shared ones: in dark its fill is
|
|
444
|
+
* the light step with a dark label, which a darkening veil would fail, so it
|
|
445
|
+
* keeps the lighter top and slight dark bottom it had (22 / 6). */
|
|
446
|
+
--gradient-control-accent-top-strength: 22%;
|
|
447
|
+
--gradient-control-accent-bottom-strength: 6%;
|
|
448
|
+
--shadow-control-highlight: inset 0 1px 0 color-mix(in srgb, var(--zabi-base-50) 25%, transparent);
|
|
294
449
|
/* Not a token: tells the browser the page is dark, so what it draws itself
|
|
295
450
|
* (date and time pickers, scrollbars, autofill, the caret of a native
|
|
296
451
|
* select) is dark too. It is the last declaration on purpose:
|
|
@@ -412,49 +567,70 @@ color-scheme: dark;
|
|
|
412
567
|
--color-base-950: var(--zabi-base-50);
|
|
413
568
|
/* Background Colors - No dark mode overrides needed, base colors are already inverted */
|
|
414
569
|
/* Page Colors - No dark mode overrides needed, base colors are already inverted */
|
|
415
|
-
/* Surface elevation — shadows don't read on dark, so
|
|
416
|
-
*
|
|
570
|
+
/* Surface elevation — shadows don't read on dark, so the surfaces carry it by tone, in two
|
|
571
|
+
* steps: page L 21.0, card L 24.1, elevated and overlay L 27.4 (D133/D134).
|
|
417
572
|
*
|
|
418
573
|
* GENERATED by scripts/generate-surfaces.js from tokens/surface-ladder.js — do not hand-edit.
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
574
|
+
* Every role is a plain step of the neutral ramp (--zabi-base-N), so hue and chroma are the
|
|
575
|
+
* ramp's own, and a --zabi-base-* override or a tinted neutral carries all of them. An overlay
|
|
576
|
+
* (sheet, menu, modal) is the same tone as elevated: it is told apart by its edge
|
|
577
|
+
* (--color-material-rim) and its shadow, not by being greyer. The hover on an overlay is one
|
|
578
|
+
* ramp step lighter; the inset is the page step, told apart by its 3:1 edge.
|
|
579
|
+
* With the default greys: #18181b / #1f1f22 / #27272a / #27272a, hover #333338, inset #18181b.
|
|
580
|
+
* Enforced by scripts/check-surface-elevation.js (ramp steps, never lighter downwards, at most
|
|
581
|
+
* two tone steps of 2–5 points, the overlay edge and the card edge). */
|
|
425
582
|
--color-surface-base: var(--zabi-base-900);
|
|
426
|
-
--color-surface-raised:
|
|
427
|
-
--color-surface-elevated:
|
|
428
|
-
--color-surface-overlay:
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
583
|
+
--color-surface-raised: var(--zabi-base-850);
|
|
584
|
+
--color-surface-elevated: var(--zabi-base-800);
|
|
585
|
+
--color-surface-overlay: var(--zabi-base-800);
|
|
586
|
+
--color-surface-overlay-hover: var(--zabi-base-750);
|
|
587
|
+
/* Inset — the page step, 3 points below the card (L 24.1). A field on the page is told apart
|
|
588
|
+
* by its 3:1 edge, as a white field on the near-white light page is. */
|
|
589
|
+
--color-surface-inset: var(--zabi-base-900);
|
|
590
|
+
/* Chrome and the bar tokens — restated so a light-only override of the page
|
|
591
|
+
* or the raised surface does not reach dark. */
|
|
592
|
+
--color-surface-chrome: var(--color-surface-base);
|
|
593
|
+
--color-bar: var(--color-surface-chrome);
|
|
594
|
+
--color-bar-border: color-mix(in srgb, var(--color-headline) 10%, transparent);
|
|
595
|
+
--color-bar-brand: var(--color-action-primary);
|
|
596
|
+
--color-tabbar-active: var(--color-nav-menu-active);
|
|
434
597
|
/* Distinct from base, raised AND elevated — a neutral chip has no hue to
|
|
435
|
-
* separate it, so it has to separate on lightness wherever it lands
|
|
598
|
+
* separate it, so it has to separate on lightness wherever it lands:
|
|
599
|
+
* base-300 is 1.70:1 on the page, 1.57:1 on the card, 1.43:1 on elevated. */
|
|
436
600
|
--color-neutral-subtle: var(--color-base-300);
|
|
437
601
|
--color-neutral-border: var(--color-base-200);
|
|
438
602
|
--color-border-overlay: var(--color-base-450);
|
|
439
603
|
/* Background Colors */
|
|
440
604
|
--color-background: var(--color-surface-base);
|
|
441
605
|
--color-background-tertiary: var(--color-base-100);
|
|
442
|
-
/* Page Colors —
|
|
443
|
-
--color-page: var(--color-base
|
|
606
|
+
/* Page Colors — the dark page (base-100 here is --zabi-base-900, the same value as before) */
|
|
607
|
+
--color-page: var(--color-surface-base);
|
|
444
608
|
/* Card Colors — aliases of the surface levels */
|
|
445
609
|
--color-card: var(--color-surface-raised);
|
|
446
610
|
--color-card-hover: var(--color-surface-elevated);
|
|
447
|
-
--color-card-active: var(--color-surface-overlay);
|
|
611
|
+
--color-card-active: var(--color-surface-overlay-hover);
|
|
448
612
|
--color-card-elevated: var(--color-surface-elevated);
|
|
613
|
+
/* Card tint, dark: the brand at 8% over the card (as the status tints of D136,
|
|
614
|
+
* which are 16%: here the field edge sets the ceiling, base-500 is 3.07:1 on
|
|
615
|
+
* this and 2.90:1 at 12%). 8% is #252733: 1.11:1 on the card and 1.20:1 on the
|
|
616
|
+
* page; headline 13.49, body 11.68, label and description 10.03, caption 7.68,
|
|
617
|
+
* link 8.81, ring 6.59:1. */
|
|
618
|
+
--color-card-tint: color-mix(in srgb, var(--zabi-brand-500) 8%, var(--color-surface-raised));
|
|
619
|
+
/* Card variant="flat", dark: a translucent step of the neutral ramp (base-50 at 7%), so a flat card
|
|
620
|
+
* is lighter than whatever it sits on, and a flat card inside a flat card is lighter again. Shadows
|
|
621
|
+
* do not carry layers on a dark page; alpha does. Hover and pressed are the same step at 11% and 15%.
|
|
622
|
+
* Restore the opaque fill: overrides: { dark: { '--color-card-flat': 'var(--color-card)' } }. */
|
|
623
|
+
--color-card-flat: color-mix(in srgb, var(--zabi-base-50) 7%, transparent);
|
|
624
|
+
--color-card-flat-hover: color-mix(in srgb, var(--zabi-base-50) 11%, transparent);
|
|
625
|
+
--color-card-flat-active: color-mix(in srgb, var(--zabi-base-50) 15%, transparent);
|
|
449
626
|
/* Surfaces — numbered aliases of the surface levels */
|
|
450
627
|
--color-surface-1: var(--color-surface-raised);
|
|
451
628
|
--color-surface-2: var(--color-surface-elevated);
|
|
452
629
|
--color-surface-3: var(--color-surface-overlay);
|
|
453
|
-
--color-surface-4: var(--color-
|
|
630
|
+
--color-surface-4: var(--color-surface-overlay-hover);
|
|
454
631
|
/*
|
|
455
|
-
* Secondary text keeps ≥ 4.5:1 on every surface level, including overlays (
|
|
456
|
-
*
|
|
457
|
-
* moves one step up to base-700 to stay visibly stronger than caption.
|
|
632
|
+
* Secondary text keeps ≥ 4.5:1 on every surface level, including overlays (L27).
|
|
633
|
+
* Caption takes base-650 and description base-700 to stay visibly stronger than it.
|
|
458
634
|
*/
|
|
459
635
|
--color-description: var(--color-base-700);
|
|
460
636
|
--color-caption: var(--color-base-650);
|
|
@@ -466,28 +642,87 @@ color-scheme: dark;
|
|
|
466
642
|
/* Overlay Colors */
|
|
467
643
|
--color-overlay: rgba(0, 0, 0, 0.7);
|
|
468
644
|
/* Input Colors
|
|
469
|
-
* Dark fields are
|
|
470
|
-
*
|
|
471
|
-
|
|
645
|
+
* Dark fields are a translucent step of the neutral ramp (base-50 at 7%), the
|
|
646
|
+
* same idea as the flat card: a well one step LIGHTER than whatever it sits on,
|
|
647
|
+
* without a rule per surface. It was the page step (--color-surface-inset), so
|
|
648
|
+
* a dark form was told from the page by its 3:1 edge alone. 7% is 1.20:1 on
|
|
649
|
+
* the page (#28282b), 1.22:1 on a card (#2e2e31) and 1.23:1 on the overlay
|
|
650
|
+
* (#363639); hover 10% and pressed 15% (1.30:1 against the resting field on
|
|
651
|
+
* all three). The edge below stays 3:1 against the surface outside it.
|
|
652
|
+
* Restore the opaque field: overrides: { dark: {
|
|
653
|
+
* '--color-input': 'var(--color-surface-inset)', '--color-input-hover': 'var(--color-base-200)',
|
|
654
|
+
* '--color-input-focus': 'var(--color-base-150)',
|
|
655
|
+
* '--color-input-active': 'color-mix(in srgb, var(--zabi-base-50) 10%, var(--color-surface-inset))' } }. */
|
|
656
|
+
--color-input: color-mix(in srgb, var(--zabi-base-50) 7%, transparent);
|
|
657
|
+
/* What a field is inside a colour block (.on-brand, .on-accent, .on-fill): the translucent
|
|
658
|
+
* well would sit on the block's fill, which the theme's text is not set for, so the field
|
|
659
|
+
* takes these opaque steps there. */
|
|
660
|
+
--color-input-solid: var(--color-surface-inset);
|
|
661
|
+
--color-input-solid-hover: var(--color-base-200);
|
|
662
|
+
--color-input-solid-focus: var(--color-base-150);
|
|
663
|
+
--color-input-solid-active: color-mix(in srgb, var(--zabi-base-50) 10%, var(--color-surface-inset));
|
|
472
664
|
/* Restated here: the root value of a var() alias is resolved at :root. */
|
|
473
665
|
--color-progress-fill: var(--color-action-primary);
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
*
|
|
666
|
+
/* The field step is the page now, so the track takes its own: base-75
|
|
667
|
+
* (#101013), a well just below the page: 1.06:1 on the page, 1.14:1 on the
|
|
668
|
+
* card, 1.45:1 on the elevated surface. It was base-250 (#333338, 1.41:1 on
|
|
669
|
+
* the page). The fill is a mid step now (brand-600), and 3:1 on its rail
|
|
670
|
+
* needs a track this dark: 3.91:1 here with the default brand (2.59:1 on
|
|
671
|
+
* base-250, 2.94:1 for an amber brand on base-200). */
|
|
672
|
+
--color-progress-track: var(--color-base-75);
|
|
673
|
+
/* Restated: the root value of a var() alias is resolved at :root. The field
|
|
674
|
+
* edge, 3.67:1 on the page and 3.40:1 on the card. */
|
|
675
|
+
--color-progress-track-border: var(--color-input-border);
|
|
676
|
+
/* base-500 (the mirror's fixed point): 3.67:1 on the dark field and the page,
|
|
677
|
+
* 3.40:1 on the card, 3.08:1 on the elevated surface and the overlay.
|
|
678
|
+
* base-300 was 1.70, 1.57 and 1.43. */
|
|
477
679
|
--color-input-border: var(--color-base-500);
|
|
478
680
|
--color-input-border-hover: var(--color-input-border);
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
*
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
--color-
|
|
681
|
+
/* The decorative hairline (Card's default variant, list dividers). Quiet, like
|
|
682
|
+
* light's: base-250 is #333338, 1.41:1 on the page and 1.31:1 on the card
|
|
683
|
+
* (base-300 was 1.70 and 1.57, base-200 only 1.10 on the card). Restated: the
|
|
684
|
+
* root value of a var() alias is resolved at :root. -medium (2.29:1) and
|
|
685
|
+
* -strong (3.67:1) keep their order above it. */
|
|
686
|
+
--color-border: var(--color-base-250);
|
|
687
|
+
--color-border-weak: var(--color-base-250);
|
|
688
|
+
/* Toggle track, off. The thumb is the card (#1f1f22), so the track cannot
|
|
689
|
+
* be as dark as it. base-300 (#3f3f46) is 1.57:1 against the thumb, and the
|
|
690
|
+
* field edge gives the 3:1: 3.67:1 on the page, 3.40:1 on the card. */
|
|
691
|
+
--color-toggle-track: var(--color-base-300);
|
|
692
|
+
--color-toggle-track-hover: var(--color-base-350);
|
|
693
|
+
--color-toggle-track-active: var(--color-base-400);
|
|
694
|
+
--color-toggle-track-border: var(--color-input-border);
|
|
695
|
+
/* Toggle knob in dark: off, a light knob on the dark track (base-700, #d4d4d8:
|
|
696
|
+
* 7.07:1 resting, 5.23:1 pressed); on, as in light (the same 4.86:1 and up). */
|
|
697
|
+
--color-toggle-knob: var(--color-base-700);
|
|
698
|
+
--color-toggle-knob-checked: var(--color-action-primary-text);
|
|
699
|
+
/* Hover 10%: 1.10:1 above the resting well on the page, the card and the overlay, body 8.65:1
|
|
700
|
+
* or more and placeholder 4.68:1 or more on it. Was base-200. */
|
|
701
|
+
--color-input-hover: color-mix(in srgb, var(--zabi-base-50) 10%, transparent);
|
|
702
|
+
/* Pressed 15% of the light end of the ramp (unmirrored, --zabi-base-50): 1.30:1 against the
|
|
703
|
+
* resting well on the page (#3a3a3c), the card (#404042) and the overlay (#474749), 1.18:1
|
|
704
|
+
* past hover, body 7.34:1 or more, placeholder 4.54:1 on a card and 4.08:1 on the overlay,
|
|
705
|
+
* short of the border (2.35:1 or less). 14% is 1.254:1 on the default and under 1.25 on a tinted ramp. Was 10% into the page step (#2f2f31). */
|
|
706
|
+
--color-input-active: color-mix(in srgb, var(--zabi-base-50) 15%, transparent);
|
|
707
|
+
/* Focus is the resting well: the ring shows focus, and hover still reads on a focused field.
|
|
708
|
+
* Was base-150. */
|
|
709
|
+
--color-input-focus: color-mix(in srgb, var(--zabi-base-50) 7%, transparent);
|
|
710
|
+
/* The field is the page step now, so the disabled field goes one step below
|
|
711
|
+
* the page (base-75, #101013): 1.07:1 on the page, 1.16:1 on the card. */
|
|
712
|
+
--color-input-disabled: var(--color-base-75);
|
|
485
713
|
/* base-500 is the mirror's fixed point, the same grey as it was in light,
|
|
486
714
|
* and a dark field is a far lighter ground for it than a white one is dark:
|
|
487
715
|
* 3.40:1 at rest, 3.08:1 on hover, 2.60:1 pressed. base-600 mirrors to
|
|
488
716
|
* --zabi-base-400 (#a1a1aa): 6.41, 5.81 and 4.90. base-550 would be 4.74
|
|
489
|
-
* at rest but under 4.5 on hover. The value text is 2.0:1 stronger.
|
|
490
|
-
|
|
717
|
+
* at rest but under 4.5 on hover. The value text is 2.0:1 stronger.
|
|
718
|
+
* The well is lighter now (a translucent step over the surface), and the
|
|
719
|
+
* pressed one over a card held base-400 to 4.04:1: so 40% of the next step
|
|
720
|
+
* toward the value (base-350, #babac1) is mixed in, #ababb3: 6.46, 5.89 and
|
|
721
|
+
* 4.98:1 at rest, hover and pressed on the page, 5.91, 5.37 and 4.54:1 on a
|
|
722
|
+
* card, 5.30, 4.82 and 4.08:1 on the overlay (pressed there is held to 4:1,
|
|
723
|
+
* see contrast-pairs.js), and 1.80:1 under the value (1.75 is the floor; 50%
|
|
724
|
+
* would be 1.75). Was base-600 (#a1a1aa). */
|
|
725
|
+
--color-input-placeholder: color-mix(in srgb, var(--zabi-base-350) 40%, var(--zabi-base-400));
|
|
491
726
|
/* Text Colors - No dark mode overrides needed, base colors are already inverted */
|
|
492
727
|
/* Border Colors - the decorative edges need no override, base colors are
|
|
493
728
|
* already inverted. The control boundary does: base-500 is the mirror's
|
|
@@ -496,6 +731,14 @@ color-scheme: dark;
|
|
|
496
731
|
* mirrors to --zabi-base-400 (#a1a1aa): 3.73:1 on the overlay, the lightest
|
|
497
732
|
* surface, and more on every level below it. base-550 is 2.76:1 there. */
|
|
498
733
|
--color-control-border: var(--color-base-600);
|
|
734
|
+
/* Segmented control thumb — restated: the aliases resolve at :root, so without
|
|
735
|
+
* these dark would keep the light card colour. The track is a light tint over
|
|
736
|
+
* the page or a card (#2c2c2f / #333335), which the overlay tone now sits
|
|
737
|
+
* below, so the thumb takes base-400 (#52525b): 1.80:1 over the page track,
|
|
738
|
+
* 1.63:1 over the card track, headline text 7.03:1. */
|
|
739
|
+
--color-segment-thumb: var(--color-base-400);
|
|
740
|
+
--color-segment-thumb-text: var(--color-headline);
|
|
741
|
+
--color-segment-thumb-border: var(--color-control-border);
|
|
499
742
|
/* Focus Colors — the same steps as light, through the mirror: brand-600 is
|
|
500
743
|
* --zabi-brand-400 here, which is also the dark primary fill, so on a
|
|
501
744
|
* primary button the ring is separated by its offset gap exactly as in light.
|
|
@@ -513,25 +756,28 @@ color-scheme: dark;
|
|
|
513
756
|
--color-focus-ring-muted: var(--color-base-600);
|
|
514
757
|
/* Primary Colors - No dark mode overrides needed, brand colors are already inverted */
|
|
515
758
|
/* Secondary Colors - No dark mode overrides needed, base colors are already inverted */
|
|
516
|
-
/* Tinted fills and edges —
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
--color-
|
|
525
|
-
--color-
|
|
526
|
-
--color-
|
|
527
|
-
--color-
|
|
528
|
-
--color-
|
|
529
|
-
--color-
|
|
530
|
-
--color-
|
|
759
|
+
/* Tinted fills and edges — the hue thinned into the card surface, not the
|
|
760
|
+
* mirrored step 100 / 200 (physical 900 / 800: deep, saturated, the loudest
|
|
761
|
+
* area on a dark screen). A tint here is a low-chroma tint of the card, and
|
|
762
|
+
* the hue is carried by the icon and the text. The mid step (500) is where
|
|
763
|
+
* the ramp's chroma peaks and the mirror's fixed point. The base is the card
|
|
764
|
+
* surface, so a badge or alert on a card is never darker than the card, and
|
|
765
|
+
* an app's override of the card surface carries through. The edge is the
|
|
766
|
+
* same mix, stronger. */
|
|
767
|
+
--color-success-subtle: color-mix(in srgb, var(--zabi-pine-500) 16%, var(--color-surface-raised));
|
|
768
|
+
--color-success-border: color-mix(in srgb, var(--zabi-pine-500) 36%, var(--color-surface-raised));
|
|
769
|
+
--color-warning-subtle: color-mix(in srgb, var(--zabi-warning-500) 16%, var(--color-surface-raised));
|
|
770
|
+
--color-warning-border: color-mix(in srgb, var(--zabi-warning-500) 36%, var(--color-surface-raised));
|
|
771
|
+
--color-error-subtle: color-mix(in srgb, var(--zabi-error-500) 16%, var(--color-surface-raised));
|
|
772
|
+
--color-error-border: color-mix(in srgb, var(--zabi-error-500) 36%, var(--color-surface-raised));
|
|
773
|
+
--color-energetic-subtle: color-mix(in srgb, var(--zabi-citron-500) 16%, var(--color-surface-raised));
|
|
774
|
+
--color-energetic-border: color-mix(in srgb, var(--zabi-citron-500) 36%, var(--color-surface-raised));
|
|
775
|
+
--color-accent-subtle: color-mix(in srgb, var(--zabi-accent-500) 16%, var(--color-surface-raised));
|
|
776
|
+
--color-accent-border: color-mix(in srgb, var(--zabi-accent-500) 36%, var(--color-surface-raised));
|
|
531
777
|
/* Label on a solid accent fill: the dark end of the ramp on its light end. */
|
|
532
778
|
--color-on-accent: var(--zabi-on-accent-dark);
|
|
533
|
-
--color-info-subtle: var(--
|
|
534
|
-
--color-info-border: var(--
|
|
779
|
+
--color-info-subtle: color-mix(in srgb, var(--zabi-iris-500) 16%, var(--color-surface-raised));
|
|
780
|
+
--color-info-border: color-mix(in srgb, var(--zabi-iris-500) 36%, var(--color-surface-raised));
|
|
535
781
|
/* Neutral Colors — base-550 mirrors to L* 57, which is only 4.35:1 on a
|
|
536
782
|
* raised surface. One step lighter clears AA on every dark surface level. */
|
|
537
783
|
--color-neutral: var(--color-base-600);
|
|
@@ -539,48 +785,112 @@ color-scheme: dark;
|
|
|
539
785
|
/* ========================================
|
|
540
786
|
ACTION COLORS - Dark Mode Overrides
|
|
541
787
|
======================================== */
|
|
542
|
-
/* Primary Actions -
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
788
|
+
/* Primary Actions - the brand hue in dark too: the same physical steps as
|
|
789
|
+
* light (600 / 700 / 800), not the mirrored ones, which would be the pale
|
|
790
|
+
* 400 / 300 / 200. White on step 600 is 4.76 to 4.86:1 (every ramp is on one
|
|
791
|
+
* lightness curve); with the default brand the fill is 3.65:1 on the page,
|
|
792
|
+
* 3.39:1 on the card and 3.07:1 on the overlay (3:1 holds on all three, WCAG
|
|
793
|
+
* 1.4.11). Hover and pressed go darker, as in light.
|
|
794
|
+
* createTheme({ darkPrimary: 'mirror' }) writes the mirrored fills instead.
|
|
795
|
+
* 🎯 TO CHANGE bg-action-primary IN DARK MODE: override --color-action-primary under `dark`. */
|
|
796
|
+
--color-action-primary: var(--zabi-brand-600);
|
|
797
|
+
--color-action-primary-hover: var(--zabi-brand-700);
|
|
798
|
+
--color-action-primary-active: var(--zabi-brand-800);
|
|
799
|
+
/* "On brand" in dark: --zabi-on-brand-dark, which follows the light label (white). If an app
|
|
800
|
+
* moves the dark primary to a pale step, it sets the knob to a dark one.
|
|
801
|
+
* --color-action-primary-text is restated, as it always was here, so that an
|
|
802
|
+
* app's light-only override of it does not carry a different label onto the
|
|
803
|
+
* dark fill. */
|
|
549
804
|
--color-on-brand: var(--zabi-on-brand-dark);
|
|
550
805
|
--color-action-primary-text: var(--color-on-brand);
|
|
551
806
|
/* Pinned like the other tints: light moved these a step darker. */
|
|
552
807
|
--color-action-primary-subtle: var(--color-brand-100);
|
|
553
808
|
--color-action-primary-subtle-hover: var(--color-brand-200);
|
|
809
|
+
--color-action-primary-border: var(--color-brand-200);
|
|
554
810
|
/* Half a step past the dark hover fill, as in light. */
|
|
555
811
|
--color-action-primary-subtle-active: color-mix(in srgb, var(--color-brand-300) 50%, var(--color-brand-200));
|
|
556
812
|
/* Secondary Actions - light alpha tint instead of the light-mode dark tint */
|
|
557
813
|
--color-action-secondary: rgba(250, 250, 250, 0.09);
|
|
558
814
|
--color-action-secondary-hover: rgba(250, 250, 250, 0.15);
|
|
559
815
|
--color-action-secondary-active: rgba(250, 250, 250, 0.21);
|
|
560
|
-
/*
|
|
816
|
+
/* Tonal Actions - the deep brand tint (brand-100 in dark is the deep end of
|
|
817
|
+
* the mirrored ramp) with a light brand label. Restated: the root values are
|
|
818
|
+
* var() aliases of roles that move in dark. Brand-800 is the light end of the
|
|
819
|
+
* mirrored ramp here: 9.48, 6.94 and 5.86:1 on the three fills. */
|
|
820
|
+
--color-action-tonal: var(--color-action-primary-subtle);
|
|
821
|
+
--color-action-tonal-hover: var(--color-action-primary-subtle-hover);
|
|
822
|
+
--color-action-tonal-active: color-mix(in srgb, var(--color-brand-300) 50%, var(--color-brand-200));
|
|
823
|
+
--color-action-tonal-text: var(--color-brand-800);
|
|
824
|
+
/* Chip, dark - its own steps, not the mirror of light. The ladder rises from
|
|
825
|
+
* the page (base-900, card base-850): rest base-750 is 1.41:1 on the page and
|
|
826
|
+
* 1.31:1 on the card, hover base-700 and pressed base-650 lighter again (1.70
|
|
827
|
+
* and 1.96 on the page). Headline is 11.43, 9.50 and 8.24:1 on the three.
|
|
828
|
+
* Restated, with the selected chip, because the root values are var() aliases. */
|
|
829
|
+
--color-chip: var(--zabi-base-750);
|
|
830
|
+
--color-chip-hover: var(--zabi-base-700);
|
|
831
|
+
--color-chip-active: var(--zabi-base-650);
|
|
832
|
+
--color-chip-text: var(--color-headline);
|
|
833
|
+
--color-chip-selected: var(--color-action-tonal);
|
|
834
|
+
--color-chip-selected-hover: var(--color-action-tonal-hover);
|
|
835
|
+
--color-chip-selected-active: var(--color-action-tonal-active);
|
|
836
|
+
--color-chip-selected-text: var(--color-action-tonal-text);
|
|
837
|
+
/* Outline Actions - the field edge, restated for the same reason. */
|
|
838
|
+
--color-action-outline-border: var(--color-input-border);
|
|
839
|
+
--color-action-outline-border-hover: var(--color-input-border-hover);
|
|
840
|
+
/* Disabled Actions - base-200 in dark is #27272a (the elevated tone), still
|
|
841
|
+
* the quietest fill, and the one the disabled label (base-500) reads on at 3.08:1.
|
|
561
842
|
* Pinned: light moved a step darker to stay visible on its darker page. */
|
|
562
843
|
--color-action-disabled: var(--color-base-200);
|
|
563
844
|
--color-action-disabled-border: var(--color-base-250);
|
|
564
|
-
/* Danger Actions —
|
|
565
|
-
*
|
|
566
|
-
* is
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
|
|
571
|
-
--color-action-danger: var(--
|
|
572
|
-
--color-action-danger-
|
|
573
|
-
--color-action-danger-
|
|
574
|
-
--color-action-danger-subtle: var(--
|
|
575
|
-
--color-action-danger-subtle-
|
|
576
|
-
--color-action-danger-text: var(--
|
|
577
|
-
/* Shadow Colors — black, not the light theme's ink tint
|
|
845
|
+
/* Danger Actions — the same physical steps as light danger (600 / 700 / 800
|
|
846
|
+
* of --zabi-error-*) with the same label (step 50), so a destructive button
|
|
847
|
+
* is one red in both modes and shares the primary's veil. Physical, not
|
|
848
|
+
* through the mirror, which would be the pale 400 / 300 / 200. Restated
|
|
849
|
+
* because `zabi-components/theme-dark-only` has to stand alone as a complete
|
|
850
|
+
* import (validate-theme.js enforces that). The subtle tints are the thin mix below. */
|
|
851
|
+
--color-action-danger: var(--zabi-error-600);
|
|
852
|
+
--color-action-danger-hover: var(--zabi-error-700);
|
|
853
|
+
--color-action-danger-active: var(--zabi-error-800);
|
|
854
|
+
--color-action-danger-subtle: var(--color-error-subtle);
|
|
855
|
+
--color-action-danger-subtle-hover: color-mix(in srgb, var(--zabi-error-500) 20%, var(--color-surface-raised));
|
|
856
|
+
--color-action-danger-subtle-active: color-mix(in srgb, var(--zabi-error-500) 32%, var(--color-surface-raised));
|
|
857
|
+
--color-action-danger-text: var(--zabi-error-50);
|
|
858
|
+
/* Shadow Colors — black, not the light theme's ink tint. Much stronger than
|
|
859
|
+
* light (0.1 / 0.06): an overlay is the same tone as the elevated surface
|
|
860
|
+
* now, so a sheet (L 27.4) floats over a card (L 24.1) by its shadow and its
|
|
861
|
+
* edge, and the shadow has to carry it. */
|
|
578
862
|
--shadow-color: 0 0 0;
|
|
579
|
-
--shadow-opacity: 0.
|
|
580
|
-
--shadow-
|
|
581
|
-
--shadow-
|
|
582
|
-
--shadow-
|
|
583
|
-
--shadow-
|
|
863
|
+
--shadow-opacity: 0.5;
|
|
864
|
+
--shadow-opacity-contact: 0.4;
|
|
865
|
+
--shadow-sm: 0 1px 2px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 2px 6px -1px rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
866
|
+
--shadow-md: 0 1px 3px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 6px 14px -2px rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
867
|
+
--shadow-lg: 0 1px 2px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 10px 30px 0 rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
868
|
+
--shadow-xl: 0 2px 4px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 20px 50px -8px rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
869
|
+
--shadow-material: 0 1px 2px 0 rgb(var(--shadow-color) / var(--shadow-opacity-contact)), 0 10px 30px 0 rgb(var(--shadow-color) / var(--shadow-opacity));
|
|
870
|
+
/* Materials — the alphas and the backdrop brightness differ (see @theme).
|
|
871
|
+
* The fills are not restated: they follow the surface tokens above. The
|
|
872
|
+
* filters are restated, because they hold a var() that resolves where it is
|
|
873
|
+
* declared; the fallbacks below are one class more specific than this rule
|
|
874
|
+
* and set them to none, so they still win in dark. */
|
|
875
|
+
--material-backdrop-brightness: 0.6;
|
|
876
|
+
--material-alpha-thin: 60%;
|
|
877
|
+
--material-alpha-regular: 68%;
|
|
878
|
+
--material-alpha-thick: 72%;
|
|
879
|
+
--material-filter-thin: blur(var(--material-blur-thin)) saturate(var(--material-saturate)) brightness(var(--material-backdrop-brightness));
|
|
880
|
+
--material-filter-regular: blur(var(--material-blur-regular)) saturate(var(--material-saturate)) brightness(var(--material-backdrop-brightness));
|
|
881
|
+
--material-filter-thick: blur(var(--material-blur-thick)) saturate(var(--material-saturate)) brightness(var(--material-backdrop-brightness));
|
|
882
|
+
--color-material-highlight: color-mix(in srgb, var(--zabi-base-50) 14%, transparent);
|
|
883
|
+
--color-material-rim: color-mix(in srgb, var(--zabi-base-50) 14%, transparent);
|
|
884
|
+
/* Gradients: the wash is quieter in dark (see @theme). The stops follow. */
|
|
885
|
+
--gradient-canvas-strength: 25%;
|
|
886
|
+
--gradient-control-top-strength: 0%;
|
|
887
|
+
--gradient-control-bottom-strength: 14%;
|
|
888
|
+
/* The accent's own strengths, no longer the shared ones: in dark its fill is
|
|
889
|
+
* the light step with a dark label, which a darkening veil would fail, so it
|
|
890
|
+
* keeps the lighter top and slight dark bottom it had (22 / 6). */
|
|
891
|
+
--gradient-control-accent-top-strength: 22%;
|
|
892
|
+
--gradient-control-accent-bottom-strength: 6%;
|
|
893
|
+
--shadow-control-highlight: inset 0 1px 0 color-mix(in srgb, var(--zabi-base-50) 25%, transparent);
|
|
584
894
|
/* Not a token: tells the browser the page is dark, so what it draws itself
|
|
585
895
|
* (date and time pickers, scrollbars, autofill, the caret of a native
|
|
586
896
|
* select) is dark too. It is the last declaration on purpose:
|