tyrell-components 1.0.0-RC13 → 1.0.0-RC14
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/README.md +1 -1
- package/css/tyrell-theme.css +167 -178
- package/css/tyrell.css +19 -0
- package/dist/tyrell-theme.css +167 -178
- package/dist/tyrell.css +19 -0
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +20 -10
- package/lib/base/ty-component.js +21 -144
- package/lib/components/button.d.ts +2 -16
- package/lib/components/button.js +0 -36
- package/lib/components/calendar-month.d.ts +2 -48
- package/lib/components/calendar-month.js +4 -166
- package/lib/components/calendar-navigation.d.ts +3 -48
- package/lib/components/calendar-navigation.js +3 -126
- package/lib/components/calendar.d.ts +3 -80
- package/lib/components/calendar.js +8 -230
- package/lib/components/checkbox.d.ts +4 -71
- package/lib/components/checkbox.js +7 -151
- package/lib/components/copy.d.ts +3 -56
- package/lib/components/copy.js +1 -120
- package/lib/components/date-picker.d.ts +13 -162
- package/lib/components/date-picker.js +41 -592
- package/lib/components/file-upload.d.ts +9 -15
- package/lib/components/file-upload.js +19 -41
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +1 -90
- package/lib/components/input.d.ts +7 -107
- package/lib/components/input.js +5 -193
- package/lib/components/modal.d.ts +17 -26
- package/lib/components/modal.js +57 -201
- package/lib/components/option.d.ts +2 -9
- package/lib/components/option.js +0 -48
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +8 -139
- package/lib/components/radio.d.ts +3 -23
- package/lib/components/radio.js +10 -65
- package/lib/components/resize-observer.d.ts +3 -30
- package/lib/components/resize-observer.js +12 -46
- package/lib/components/scroll-container.d.ts +2 -12
- package/lib/components/scroll-container.js +3 -46
- package/lib/components/select.d.ts +22 -153
- package/lib/components/select.js +33 -590
- package/lib/components/selected-tags.d.ts +4 -47
- package/lib/components/selected-tags.js +1 -95
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +0 -6
- package/lib/components/switch.d.ts +0 -11
- package/lib/components/switch.js +2 -36
- package/lib/components/tab.d.ts +1 -6
- package/lib/components/tab.js +0 -7
- package/lib/components/tabs.d.ts +5 -63
- package/lib/components/tabs.js +20 -283
- package/lib/components/tag.d.ts +2 -36
- package/lib/components/tag.js +5 -105
- package/lib/components/textarea.d.ts +6 -86
- package/lib/components/textarea.js +2 -173
- package/lib/components/tooltip.d.ts +3 -11
- package/lib/components/tooltip.js +24 -160
- package/lib/components/wizard.d.ts +6 -54
- package/lib/components/wizard.js +15 -228
- package/lib/icons/fontawesome/brands.d.ts +0 -1
- package/lib/icons/fontawesome/brands.js +0 -8
- package/lib/icons/fontawesome/regular.d.ts +0 -1
- package/lib/icons/fontawesome/regular.js +0 -8
- package/lib/icons/fontawesome/solid.d.ts +0 -1
- package/lib/icons/fontawesome/solid.js +0 -8
- package/lib/icons/heroicons/micro.d.ts +0 -1
- package/lib/icons/heroicons/micro.js +0 -8
- package/lib/icons/heroicons/mini.d.ts +0 -1
- package/lib/icons/heroicons/mini.js +0 -8
- package/lib/icons/heroicons/outline.d.ts +0 -1
- package/lib/icons/heroicons/outline.js +0 -8
- package/lib/icons/heroicons/solid.d.ts +0 -1
- package/lib/icons/heroicons/solid.js +0 -8
- package/lib/icons/lucide.d.ts +0 -1
- package/lib/icons/lucide.js +0 -1872
- package/lib/icons/material/filled.d.ts +0 -1
- package/lib/icons/material/filled.js +0 -10
- package/lib/icons/material/outlined.d.ts +0 -1
- package/lib/icons/material/outlined.js +0 -10
- package/lib/icons/material/round.d.ts +0 -1
- package/lib/icons/material/round.js +0 -10
- package/lib/icons/material/sharp.d.ts +0 -1
- package/lib/icons/material/sharp.js +0 -10
- package/lib/icons/material/two-tone.d.ts +0 -1
- package/lib/icons/material/two-tone.js +0 -10
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -20
- package/lib/styles/button.d.ts +2 -20
- package/lib/styles/button.js +22 -122
- package/lib/styles/calendar-month.d.ts +1 -5
- package/lib/styles/calendar-month.js +4 -61
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +2 -27
- package/lib/styles/calendar.d.ts +1 -2
- package/lib/styles/calendar.js +1 -14
- package/lib/styles/checkbox.d.ts +0 -1
- package/lib/styles/checkbox.js +1 -23
- package/lib/styles/copy.d.ts +0 -1
- package/lib/styles/copy.js +2 -17
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +3 -18
- package/lib/styles/date-picker.d.ts +1 -5
- package/lib/styles/date-picker.js +35 -39
- package/lib/styles/file-upload.d.ts +1 -2
- package/lib/styles/file-upload.js +1 -16
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +7 -21
- package/lib/styles/input.d.ts +1 -6
- package/lib/styles/input.js +5 -54
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +21 -23
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +17 -12
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +26 -30
- package/lib/styles/radio.d.ts +0 -1
- package/lib/styles/radio.js +2 -16
- package/lib/styles/resize-observer.d.ts +1 -2
- package/lib/styles/resize-observer.js +0 -7
- package/lib/styles/scroll-container.d.ts +1 -2
- package/lib/styles/scroll-container.js +0 -19
- package/lib/styles/select-base.d.ts +0 -1
- package/lib/styles/select-base.js +68 -79
- package/lib/styles/select.d.ts +1 -2
- package/lib/styles/select.js +7 -15
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +0 -4
- package/lib/styles/switch.d.ts +0 -1
- package/lib/styles/switch.js +2 -20
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +0 -5
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +10 -48
- package/lib/styles/tag.d.ts +1 -5
- package/lib/styles/tag.js +2 -31
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +2 -45
- package/lib/styles/tooltip.d.ts +0 -1
- package/lib/styles/tooltip.js +0 -10
- package/lib/styles/wizard.d.ts +5 -21
- package/lib/styles/wizard.js +8 -88
- package/lib/types/common.d.ts +0 -2
- package/lib/types/common.js +0 -12
- package/lib/utils/calendar-utils.d.ts +4 -21
- package/lib/utils/calendar-utils.js +4 -177
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +1 -45
- package/lib/utils/flavor-sheet.d.ts +0 -1
- package/lib/utils/flavor-sheet.js +0 -23
- package/lib/utils/icon-registry.d.ts +0 -2
- package/lib/utils/icon-registry.js +1 -107
- package/lib/utils/icons.d.ts +0 -1
- package/lib/utils/icons.js +0 -9
- package/lib/utils/loader-registry.d.ts +0 -1
- package/lib/utils/loader-registry.js +0 -32
- package/lib/utils/locale.d.ts +2 -23
- package/lib/utils/locale.js +0 -86
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +0 -17
- package/lib/utils/number-format.d.ts +6 -3
- package/lib/utils/number-format.js +11 -67
- package/lib/utils/positioning.d.ts +50 -7
- package/lib/utils/positioning.js +52 -62
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +0 -108
- package/lib/utils/property-manager.d.ts +0 -1
- package/lib/utils/property-manager.js +0 -70
- package/lib/utils/resize-observer.d.ts +0 -1
- package/lib/utils/resize-observer.js +0 -36
- package/lib/utils/scroll-lock.d.ts +4 -11
- package/lib/utils/scroll-lock.js +0 -107
- package/lib/utils/styles.d.ts +0 -1
- package/lib/utils/styles.js +0 -24
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +2 -2
- package/lib/base/ty-component.d.ts.map +0 -1
- package/lib/base/ty-component.js.map +0 -1
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js.map +0 -1
- package/lib/components/calendar-month.d.ts.map +0 -1
- package/lib/components/calendar-month.js.map +0 -1
- package/lib/components/calendar-navigation.d.ts.map +0 -1
- package/lib/components/calendar-navigation.js.map +0 -1
- package/lib/components/calendar.d.ts.map +0 -1
- package/lib/components/calendar.js.map +0 -1
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js.map +0 -1
- package/lib/components/copy.d.ts.map +0 -1
- package/lib/components/copy.js.map +0 -1
- package/lib/components/date-picker.d.ts.map +0 -1
- package/lib/components/date-picker.js.map +0 -1
- package/lib/components/file-upload.d.ts.map +0 -1
- package/lib/components/file-upload.js.map +0 -1
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js.map +0 -1
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js.map +0 -1
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/option.d.ts.map +0 -1
- package/lib/components/option.js.map +0 -1
- package/lib/components/popup.d.ts.map +0 -1
- package/lib/components/popup.js.map +0 -1
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js.map +0 -1
- package/lib/components/resize-observer.d.ts.map +0 -1
- package/lib/components/resize-observer.js.map +0 -1
- package/lib/components/scroll-container.d.ts.map +0 -1
- package/lib/components/scroll-container.js.map +0 -1
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js.map +0 -1
- package/lib/components/selected-tags.d.ts.map +0 -1
- package/lib/components/selected-tags.js.map +0 -1
- package/lib/components/step.d.ts.map +0 -1
- package/lib/components/step.js.map +0 -1
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js.map +0 -1
- package/lib/components/tab.d.ts.map +0 -1
- package/lib/components/tab.js.map +0 -1
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js.map +0 -1
- package/lib/components/tag.d.ts.map +0 -1
- package/lib/components/tag.js.map +0 -1
- package/lib/components/textarea.d.ts.map +0 -1
- package/lib/components/textarea.js.map +0 -1
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js.map +0 -1
- package/lib/components/wizard.d.ts.map +0 -1
- package/lib/components/wizard.js.map +0 -1
- package/lib/icons/fontawesome/brands.d.ts.map +0 -1
- package/lib/icons/fontawesome/brands.js.map +0 -1
- package/lib/icons/fontawesome/regular.d.ts.map +0 -1
- package/lib/icons/fontawesome/regular.js.map +0 -1
- package/lib/icons/fontawesome/solid.d.ts.map +0 -1
- package/lib/icons/fontawesome/solid.js.map +0 -1
- package/lib/icons/heroicons/micro.d.ts.map +0 -1
- package/lib/icons/heroicons/micro.js.map +0 -1
- package/lib/icons/heroicons/mini.d.ts.map +0 -1
- package/lib/icons/heroicons/mini.js.map +0 -1
- package/lib/icons/heroicons/outline.d.ts.map +0 -1
- package/lib/icons/heroicons/outline.js.map +0 -1
- package/lib/icons/heroicons/solid.d.ts.map +0 -1
- package/lib/icons/heroicons/solid.js.map +0 -1
- package/lib/icons/lucide.d.ts.map +0 -1
- package/lib/icons/lucide.js.map +0 -1
- package/lib/icons/material/filled.d.ts.map +0 -1
- package/lib/icons/material/filled.js.map +0 -1
- package/lib/icons/material/outlined.d.ts.map +0 -1
- package/lib/icons/material/outlined.js.map +0 -1
- package/lib/icons/material/round.d.ts.map +0 -1
- package/lib/icons/material/round.js.map +0 -1
- package/lib/icons/material/sharp.d.ts.map +0 -1
- package/lib/icons/material/sharp.js.map +0 -1
- package/lib/icons/material/two-tone.d.ts.map +0 -1
- package/lib/icons/material/two-tone.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/styles/button.d.ts.map +0 -1
- package/lib/styles/button.js.map +0 -1
- package/lib/styles/calendar-month.d.ts.map +0 -1
- package/lib/styles/calendar-month.js.map +0 -1
- package/lib/styles/calendar-navigation.d.ts.map +0 -1
- package/lib/styles/calendar-navigation.js.map +0 -1
- package/lib/styles/calendar.d.ts.map +0 -1
- package/lib/styles/calendar.js.map +0 -1
- package/lib/styles/checkbox.d.ts.map +0 -1
- package/lib/styles/checkbox.js.map +0 -1
- package/lib/styles/copy.d.ts.map +0 -1
- package/lib/styles/copy.js.map +0 -1
- package/lib/styles/custom-scrollbar.d.ts.map +0 -1
- package/lib/styles/custom-scrollbar.js.map +0 -1
- package/lib/styles/date-picker.d.ts.map +0 -1
- package/lib/styles/date-picker.js.map +0 -1
- package/lib/styles/file-upload.d.ts.map +0 -1
- package/lib/styles/file-upload.js.map +0 -1
- package/lib/styles/icon.d.ts.map +0 -1
- package/lib/styles/icon.js.map +0 -1
- package/lib/styles/input.d.ts.map +0 -1
- package/lib/styles/input.js.map +0 -1
- package/lib/styles/modal.d.ts.map +0 -1
- package/lib/styles/modal.js.map +0 -1
- package/lib/styles/multiselect.d.ts +0 -8
- package/lib/styles/multiselect.d.ts.map +0 -1
- package/lib/styles/multiselect.js +0 -849
- package/lib/styles/multiselect.js.map +0 -1
- package/lib/styles/option.d.ts.map +0 -1
- package/lib/styles/option.js.map +0 -1
- package/lib/styles/popup.d.ts.map +0 -1
- package/lib/styles/popup.js.map +0 -1
- package/lib/styles/radio.d.ts.map +0 -1
- package/lib/styles/radio.js.map +0 -1
- package/lib/styles/resize-observer.d.ts.map +0 -1
- package/lib/styles/resize-observer.js.map +0 -1
- package/lib/styles/scroll-container.d.ts.map +0 -1
- package/lib/styles/scroll-container.js.map +0 -1
- package/lib/styles/select-base.d.ts.map +0 -1
- package/lib/styles/select-base.js.map +0 -1
- package/lib/styles/select.d.ts.map +0 -1
- package/lib/styles/select.js.map +0 -1
- package/lib/styles/step.d.ts.map +0 -1
- package/lib/styles/step.js.map +0 -1
- package/lib/styles/switch.d.ts.map +0 -1
- package/lib/styles/switch.js.map +0 -1
- package/lib/styles/tab.d.ts.map +0 -1
- package/lib/styles/tab.js.map +0 -1
- package/lib/styles/tabs.d.ts.map +0 -1
- package/lib/styles/tabs.js.map +0 -1
- package/lib/styles/tag.d.ts.map +0 -1
- package/lib/styles/tag.js.map +0 -1
- package/lib/styles/textarea.d.ts.map +0 -1
- package/lib/styles/textarea.js.map +0 -1
- package/lib/styles/tooltip.d.ts.map +0 -1
- package/lib/styles/tooltip.js.map +0 -1
- package/lib/styles/wizard.d.ts.map +0 -1
- package/lib/styles/wizard.js.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/common.js.map +0 -1
- package/lib/utils/calendar-utils.d.ts.map +0 -1
- package/lib/utils/calendar-utils.js.map +0 -1
- package/lib/utils/custom-scrollbar.d.ts.map +0 -1
- package/lib/utils/custom-scrollbar.js.map +0 -1
- package/lib/utils/flavor-sheet.d.ts.map +0 -1
- package/lib/utils/flavor-sheet.js.map +0 -1
- package/lib/utils/icon-registry.d.ts.map +0 -1
- package/lib/utils/icon-registry.js.map +0 -1
- package/lib/utils/icons.d.ts.map +0 -1
- package/lib/utils/icons.js.map +0 -1
- package/lib/utils/loader-registry.d.ts.map +0 -1
- package/lib/utils/loader-registry.js.map +0 -1
- package/lib/utils/locale.d.ts.map +0 -1
- package/lib/utils/locale.js.map +0 -1
- package/lib/utils/mobile.d.ts.map +0 -1
- package/lib/utils/mobile.js.map +0 -1
- package/lib/utils/number-format.d.ts.map +0 -1
- package/lib/utils/number-format.js.map +0 -1
- package/lib/utils/parse-boolean.d.ts +0 -39
- package/lib/utils/parse-boolean.d.ts.map +0 -1
- package/lib/utils/parse-boolean.js +0 -58
- package/lib/utils/parse-boolean.js.map +0 -1
- package/lib/utils/positioning.d.ts.map +0 -1
- package/lib/utils/positioning.js.map +0 -1
- package/lib/utils/property-capture.d.ts.map +0 -1
- package/lib/utils/property-capture.js.map +0 -1
- package/lib/utils/property-manager.d.ts.map +0 -1
- package/lib/utils/property-manager.js.map +0 -1
- package/lib/utils/resize-observer.d.ts.map +0 -1
- package/lib/utils/resize-observer.js.map +0 -1
- package/lib/utils/scroll-lock.d.ts.map +0 -1
- package/lib/utils/scroll-lock.js.map +0 -1
- package/lib/utils/styles.d.ts.map +0 -1
- package/lib/utils/styles.js.map +0 -1
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js.map +0 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ import 'tyrell-components/input'
|
|
|
62
62
|
|
|
63
63
|
## Available Components
|
|
64
64
|
|
|
65
|
-
- **ty-button** - Button with multiple flavors (primary,
|
|
65
|
+
- **ty-button** - Button with multiple flavors (primary, success, danger, warning, neutral)
|
|
66
66
|
- **ty-modal** - Modal dialog with backdrop, ESC key, focus trap
|
|
67
67
|
- **ty-input** - Input field with validation, number formatting
|
|
68
68
|
- **ty-dropdown** - Dropdown with positioning, keyboard navigation
|
package/css/tyrell-theme.css
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* <link rel="stylesheet" href=".../tyrell-theme.css">
|
|
14
14
|
*
|
|
15
15
|
* :root {
|
|
16
|
-
* --ty-
|
|
17
|
-
* --ty-
|
|
16
|
+
* --ty-primary-hue: 200; // teal. Try 260 indigo, 30 orange, 145 emerald.
|
|
17
|
+
* --ty-primary-chroma: 0.13;
|
|
18
18
|
* }
|
|
19
19
|
*
|
|
20
20
|
* =====================================================================
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
* Every color in the library is one formula on five axes:
|
|
25
25
|
*
|
|
26
26
|
* oklch(
|
|
27
|
-
* L = L-curve[shade] × flavor-l-factor ← Tier
|
|
28
|
-
* C = flavor-chroma × saturation-curve[shade] ← Tier
|
|
29
|
-
* H = flavor-hue ← Tier
|
|
27
|
+
* L = L-curve[shade] × flavor-l-factor ← Tier 2 × Tier 4
|
|
28
|
+
* C = flavor-chroma × saturation-curve[shade] ← Tier 1 × Tier 3
|
|
29
|
+
* H = flavor-hue ← Tier 1
|
|
30
30
|
* )
|
|
31
31
|
*
|
|
32
32
|
* Pick a flavor (primary / success / warning / danger /
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
*
|
|
62
62
|
* SECTION 1 — KNOBS
|
|
63
63
|
* The variables you might want to override. Six tiers from drop-in
|
|
64
|
-
* rebrand (Tier 1) to surgical per-flavor tweak (Tier
|
|
65
|
-
* buttons (Tier
|
|
64
|
+
* rebrand (Tier 1) to surgical per-flavor tweak (Tier 4) plus solid
|
|
65
|
+
* buttons (Tier 5).
|
|
66
66
|
*
|
|
67
67
|
* SECTION 2 — IMPLEMENTATION
|
|
68
68
|
* The oklch() expressions that wire the knobs through to the actual
|
|
69
69
|
* color tokens. Rarely needs editing — Section 1 is the contract.
|
|
70
70
|
*
|
|
71
71
|
* Browser support: oklch() is in every evergreen browser since mid-2023.
|
|
72
|
-
* Tier
|
|
72
|
+
* Tier 5 (solid) additionally uses OKLCH relative color — oklch(from …) —
|
|
73
73
|
* which lands later: Chrome 119, Safari 16.4, Firefox 128 (mid-2024).
|
|
74
74
|
* Solid fills have no fallback below those versions.
|
|
75
75
|
*
|
|
@@ -83,59 +83,53 @@
|
|
|
83
83
|
* these in your own `:root` (or `html.dark` for per-mode tuning) —
|
|
84
84
|
* your declaration wins by source order.
|
|
85
85
|
*
|
|
86
|
-
* Tier 1 — SEEDS
|
|
87
|
-
* Tier 2 —
|
|
88
|
-
* Tier 3 —
|
|
89
|
-
* Tier 4 —
|
|
90
|
-
* Tier 5 — PER-FLAVOR L-FACTOR per-flavor lightness multiplier — push
|
|
86
|
+
* Tier 1 — FLAVOR SEEDS each flavor's hue + chroma, incl. primary.
|
|
87
|
+
* Tier 2 — L-CURVE 5 lightness stops for the emphasis ramp.
|
|
88
|
+
* Tier 3 — SATURATION CURVE per-shade chroma multipliers.
|
|
89
|
+
* Tier 4 — PER-FLAVOR L-FACTOR per-flavor lightness multiplier — push
|
|
91
90
|
* one flavor up or down without touching
|
|
92
91
|
* the others. Default 1.
|
|
93
|
-
* Tier
|
|
92
|
+
* Tier 5 — SOLID FILLS solid-button system: hover/active/tone
|
|
94
93
|
* L offsets + per-theme dim/desaturate.
|
|
95
94
|
* ===================================================================== */
|
|
96
95
|
|
|
97
96
|
:root {
|
|
98
97
|
/* ----------------------------------------------------------------
|
|
99
|
-
* Tier 1 — SEEDS
|
|
100
|
-
*
|
|
101
|
-
*
|
|
98
|
+
* Tier 1 — FLAVOR SEEDS
|
|
99
|
+
* Every flavor — including primary — is one hue + one chroma. No
|
|
100
|
+
* flavor derives from another; each is a standalone dial:
|
|
101
|
+
* --ty-success-hue: 160; (more teal)
|
|
102
|
+
* --ty-warning-chroma: 0.2; (more vivid)
|
|
103
|
+
* Rebrand by overriding --ty-primary-hue/-chroma alone; touch the
|
|
104
|
+
* others only when a specific flavor needs its own tuning.
|
|
102
105
|
* --------------------------------------------------------------*/
|
|
103
106
|
|
|
104
|
-
--ty-
|
|
105
|
-
--ty-
|
|
107
|
+
--ty-primary-hue: 252;
|
|
108
|
+
--ty-primary-chroma: 0.08; /* restrained default; the loud 0.2 read as "bollywood" */
|
|
106
109
|
|
|
107
|
-
/* Surface tint. 0 = monochrome surfaces (default, no
|
|
108
|
-
* Bump to ~0.005 (light) / ~0.012 (dark) to warm surfaces toward
|
|
110
|
+
/* Surface tint. 0 = monochrome surfaces (default, no primary leak).
|
|
111
|
+
* Bump to ~0.005 (light) / ~0.012 (dark) to warm surfaces toward primary. */
|
|
109
112
|
--ty-surface-chroma: 0;
|
|
110
113
|
|
|
111
|
-
/* ----------------------------------------------------------------
|
|
112
|
-
* Tier 2 — PER-FLAVOR ANCHORS
|
|
113
|
-
* Semantic colors (success/warning/danger/neutral) have their own
|
|
114
|
-
* hue + chroma seeds so they keep meaning across brand changes.
|
|
115
|
-
* Override any individually:
|
|
116
|
-
* --ty-success-hue: 160; (more teal)
|
|
117
|
-
* --ty-warning-chroma: 0.2; (more vivid)
|
|
118
|
-
* --------------------------------------------------------------*/
|
|
119
|
-
|
|
120
114
|
--ty-success-hue: 145;
|
|
121
|
-
--ty-success-chroma:
|
|
115
|
+
--ty-success-chroma: 0.086;
|
|
122
116
|
|
|
123
|
-
--ty-warning-hue:
|
|
124
|
-
--ty-warning-chroma:
|
|
117
|
+
--ty-warning-hue: 76;
|
|
118
|
+
--ty-warning-chroma: 0.178;
|
|
125
119
|
|
|
126
|
-
--ty-danger-hue:
|
|
127
|
-
--ty-danger-chroma:
|
|
120
|
+
--ty-danger-hue: 31;
|
|
121
|
+
--ty-danger-chroma: 0.134;
|
|
128
122
|
|
|
129
|
-
/* Neutral is ACHROMATIC by default — greys do not follow
|
|
123
|
+
/* Neutral is ACHROMATIC by default — greys do not follow primary.
|
|
130
124
|
* Most of an interface is monochrome; a rebrand should not drift it.
|
|
131
|
-
* To warm greys toward
|
|
132
|
-
* --ty-neutral-hue: var(--ty-
|
|
133
|
-
* --ty-neutral-chroma:
|
|
125
|
+
* To warm greys toward primary (the pre-2026-08 behavior), opt in:
|
|
126
|
+
* --ty-neutral-hue: var(--ty-primary-hue);
|
|
127
|
+
* --ty-neutral-chroma: 0.003; */
|
|
134
128
|
--ty-neutral-hue: 0;
|
|
135
129
|
--ty-neutral-chroma: 0;
|
|
136
130
|
|
|
137
131
|
/* ----------------------------------------------------------------
|
|
138
|
-
* Tier
|
|
132
|
+
* Tier 2 — L-CURVE (light mode)
|
|
139
133
|
* 5 lightness stops per flavor for the emphasis ramp.
|
|
140
134
|
* Lower L = darker = more emphasis in light mode.
|
|
141
135
|
* Plus 3 bg L stops for the soft-tint backgrounds.
|
|
@@ -147,9 +141,16 @@
|
|
|
147
141
|
--ty-l-soft: 0.72; /* - low emphasis */
|
|
148
142
|
--ty-l-faint: 0.88; /* -- min emphasis */
|
|
149
143
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
/* BG TRACK — the flavor's BASE color at low opacity, composited over
|
|
145
|
+
* whatever surface it sits on. No bg-specific L or chroma stops: the
|
|
146
|
+
* ink is always mid-scale (gamut-happy, l-factor-safe), and the alpha
|
|
147
|
+
* does the washing. Direction is automatic — the same token lightens
|
|
148
|
+
* a dark surface and darkens a light one — and l-factor reaches the
|
|
149
|
+
* tint only through the ink, scaled by alpha: it points, it doesn't
|
|
150
|
+
* shove. */
|
|
151
|
+
--ty-a-bg-base: 9%;
|
|
152
|
+
--ty-a-bg-bold: 17%;
|
|
153
|
+
--ty-a-bg-soft: 4%;
|
|
153
154
|
|
|
154
155
|
/* Text ladder (--ty-text-*) and surface borders — historically
|
|
155
156
|
* hardcoded hexes in tyrell.css that a rebrand never touched; now
|
|
@@ -202,7 +203,7 @@
|
|
|
202
203
|
--ty-focus-ring-alpha: 5%; /* focus ring mix strength (dark needs more) */
|
|
203
204
|
|
|
204
205
|
/* ----------------------------------------------------------------
|
|
205
|
-
* Tier
|
|
206
|
+
* Tier 3 — SATURATION CURVE
|
|
206
207
|
* Per-shade chroma multipliers. Each shade's chroma =
|
|
207
208
|
* flavor-chroma × multiplier. Drops near the extremes so
|
|
208
209
|
* near-white and near-black can hold their tint.
|
|
@@ -214,18 +215,14 @@
|
|
|
214
215
|
--ty-c-soft-mult: 0.77;
|
|
215
216
|
--ty-c-faint-mult: 0.46;
|
|
216
217
|
|
|
217
|
-
--ty-c-bg-base-mult: 0.15;
|
|
218
|
-
--ty-c-bg-bold-mult: 0.38;
|
|
219
|
-
--ty-c-bg-soft-mult: 0.08;
|
|
220
|
-
|
|
221
218
|
/* ----------------------------------------------------------------
|
|
222
|
-
* Tier
|
|
219
|
+
* Tier 4 — PER-FLAVOR L-FACTOR
|
|
223
220
|
* Multiplies the L-curve values for that flavor only. Default 1 =
|
|
224
|
-
* no change. Useful when one flavor's
|
|
225
|
-
*
|
|
221
|
+
* no change. Useful when one flavor's hue sits too close to
|
|
222
|
+
* primary's on the wheel and the buttons blend.
|
|
226
223
|
*
|
|
227
|
-
* Example:
|
|
228
|
-
* Both render as similar warm browns at
|
|
224
|
+
* Example: primary-hue: 47° (gold). Warning sits at 75° (amber).
|
|
225
|
+
* Both render as similar warm browns at that chroma. Drop warning
|
|
229
226
|
* a notch and it darkens enough to stand apart:
|
|
230
227
|
* --ty-warning-l-factor: 0.85;
|
|
231
228
|
*
|
|
@@ -235,24 +232,24 @@
|
|
|
235
232
|
* light AND set its inverse (1 / factor, roughly) in `html.dark`.
|
|
236
233
|
* --------------------------------------------------------------*/
|
|
237
234
|
|
|
238
|
-
--ty-primary-l-factor:
|
|
235
|
+
--ty-primary-l-factor: 0.96;
|
|
239
236
|
--ty-success-l-factor: 1;
|
|
240
|
-
--ty-warning-l-factor: 1.
|
|
241
|
-
--ty-danger-l-factor:
|
|
237
|
+
--ty-warning-l-factor: 1.3;
|
|
238
|
+
--ty-danger-l-factor: 0.93;
|
|
242
239
|
--ty-neutral-l-factor: 1;
|
|
243
240
|
|
|
244
241
|
/* ----------------------------------------------------------------
|
|
245
|
-
* Tier
|
|
242
|
+
* Tier 5 — SOLID FILLS
|
|
246
243
|
* Solid buttons are their OWN system, not the emphasis ramp. Each
|
|
247
244
|
* flavor's fill defaults to --ty-color-{flavor}; the knobs below
|
|
248
245
|
* derive its hover / active / tone+ / tone- and per-theme adjust.
|
|
249
|
-
* Math lives in SECTION 2 (search "Tier
|
|
246
|
+
* Math lives in SECTION 2 (search "Tier 5 — SOLID"); these are the
|
|
250
247
|
* dials.
|
|
251
248
|
*
|
|
252
249
|
* Axis A — interaction & tone, OKLCH L offsets on the fill.
|
|
253
250
|
* Axis B — per-theme adjust applied to the base fill (dim/desaturate).
|
|
254
251
|
*
|
|
255
|
-
* NOTE: like Tier
|
|
252
|
+
* NOTE: like Tier 4, the emphasis curve flips for dark, so these L
|
|
256
253
|
* offsets are sign-flipped in `html.dark` below (darken in light =
|
|
257
254
|
* lighten in dark). Keep the two blocks in sync.
|
|
258
255
|
* --------------------------------------------------------------*/
|
|
@@ -276,17 +273,32 @@
|
|
|
276
273
|
* black-text (Material treats amber the same way). Other flavors: 0. */
|
|
277
274
|
--ty-primary-solid-l: 0;
|
|
278
275
|
--ty-success-solid-l: 0;
|
|
279
|
-
--ty-warning-solid-l: 0
|
|
276
|
+
--ty-warning-solid-l: 0;
|
|
280
277
|
--ty-danger-solid-l: 0;
|
|
281
278
|
}
|
|
282
279
|
|
|
283
|
-
/* Dark mode overrides for the L-curve and saturation curve
|
|
284
|
-
*
|
|
280
|
+
/* Dark mode overrides for the L-curve and saturation curve, plus Tier 1
|
|
281
|
+
* (per-flavor hue/chroma, incl. primary) and Tier 4 (l-factor)
|
|
282
|
+
* — dark ships its own distinct flavor tuning here, not a
|
|
283
|
+
* carry-through of :root's light values. */
|
|
285
284
|
html.dark,
|
|
286
285
|
html[data-theme="dark"],
|
|
287
286
|
[data-ty-theme].dark,
|
|
288
287
|
[data-ty-theme][data-theme="dark"] {
|
|
289
|
-
|
|
288
|
+
--ty-primary-l-factor: 1;
|
|
289
|
+
--ty-solid-fg-threshold: 0.5 !important;
|
|
290
|
+
--ty-primary-hue: 226;
|
|
291
|
+
--ty-primary-chroma: 0.065;
|
|
292
|
+
--ty-success-hue: 129;
|
|
293
|
+
--ty-success-chroma: 0.092;
|
|
294
|
+
--ty-success-l-factor: 1.09;
|
|
295
|
+
--ty-danger-hue: 13;
|
|
296
|
+
--ty-danger-chroma: 0.101;
|
|
297
|
+
--ty-danger-l-factor: 1.06;
|
|
298
|
+
--ty-warning-hue: 82;
|
|
299
|
+
--ty-warning-chroma: 0.195;
|
|
300
|
+
--ty-warning-l-factor: 1.5;
|
|
301
|
+
/* Tier 2 dark — inverted curve. Higher L = lighter text = more
|
|
290
302
|
* emphasis on a dark background. */
|
|
291
303
|
--ty-l-strong: 0.72;
|
|
292
304
|
--ty-l-bold: 0.66;
|
|
@@ -294,9 +306,11 @@ html[data-theme="dark"],
|
|
|
294
306
|
--ty-l-soft: 0.46;
|
|
295
307
|
--ty-l-faint: 0.3;
|
|
296
308
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
--ty-
|
|
309
|
+
/* BG TRACK dark — dark ink sits closer to its surface in L than
|
|
310
|
+
* light's does, so the tint needs a touch more alpha to be felt. */
|
|
311
|
+
--ty-a-bg-base: 13%;
|
|
312
|
+
--ty-a-bg-bold: 22%;
|
|
313
|
+
--ty-a-bg-soft: 7%;
|
|
300
314
|
|
|
301
315
|
/* Text ladder + surface borders dark — L matched to the hexes
|
|
302
316
|
* tyrell.css used to hardcode (#fff/#f9fafb/#d6d6d6/#7f8590/#555a63,
|
|
@@ -330,12 +344,12 @@ html[data-theme="dark"],
|
|
|
330
344
|
--ty-l-bg-neutral-faint: 0.15;
|
|
331
345
|
--ty-c-bg-neutral-faint-mult: 2;
|
|
332
346
|
|
|
333
|
-
/* Tier
|
|
347
|
+
/* Tier 4 dark — neutral inks pulled down a notch against dark surfaces. */
|
|
334
348
|
--ty-neutral-l-factor: 0.8;
|
|
335
349
|
|
|
336
350
|
--ty-focus-ring-alpha: 20%;
|
|
337
351
|
|
|
338
|
-
/* Tier
|
|
352
|
+
/* Tier 3 dark — dim shades hold more chroma so they don't grey out;
|
|
339
353
|
* strong shades trim chroma so bright tones don't over-pop. */
|
|
340
354
|
--ty-c-strong-mult: 0.77;
|
|
341
355
|
--ty-c-bold-mult: 1;
|
|
@@ -343,11 +357,7 @@ html[data-theme="dark"],
|
|
|
343
357
|
--ty-c-soft-mult: 0.77;
|
|
344
358
|
--ty-c-faint-mult: 0.5;
|
|
345
359
|
|
|
346
|
-
|
|
347
|
-
--ty-c-bg-bold-mult: 0.54;
|
|
348
|
-
--ty-c-bg-soft-mult: 0.23;
|
|
349
|
-
|
|
350
|
-
/* Tier 6 dark — interaction offsets flip sign (press LIGHTENS on dark),
|
|
360
|
+
/* Tier 5 dark — interaction offsets flip sign (press LIGHTENS on dark),
|
|
351
361
|
* and the per-theme adjust dims + desaturates the fills against the
|
|
352
362
|
* dark canvas. (Computed solid tokens are declared once at html:root.) */
|
|
353
363
|
/* Bigger than light mode's 0.04/0.08: small L deltas at the dark end of
|
|
@@ -386,8 +396,8 @@ html[data-theme="dark"],
|
|
|
386
396
|
* Formulas are declared ONCE, at `html:root` (specificity 0,1,1 — NOT
|
|
387
397
|
* plain `:root` (0,1,0)): they out-rank tyrell.css's hardcoded light
|
|
388
398
|
* tokens by specificity and its hardcoded `html.dark` hexes (0,1,1) by
|
|
389
|
-
* source order, since the
|
|
390
|
-
* formula duplicates — the dials they read (Tier 3
|
|
399
|
+
* source order, since the theme layer loads after. Dark mode needs no
|
|
400
|
+
* formula duplicates — the dials they read (Tier 2/3, SECTION 1) are
|
|
391
401
|
* what flip per mode. The `html.dark` block at the END of this file
|
|
392
402
|
* holds only genuine per-mode DATA (surface ladder, hand-pinned
|
|
393
403
|
* absolutes) — never formulas. If you add a token here, do NOT mirror
|
|
@@ -403,8 +413,8 @@ html:root,
|
|
|
403
413
|
* ramp formula reads that seed's c + h channels via relative color
|
|
404
414
|
* syntax; L always comes from the mode-flipped curve. Two ways in:
|
|
405
415
|
*
|
|
406
|
-
* numbers (default) — the Tier 1
|
|
407
|
-
* seed: --ty-
|
|
416
|
+
* numbers (default) — the Tier 1 hue+chroma dials construct the
|
|
417
|
+
* seed: --ty-primary-hue: 200; --ty-primary-chroma: 0.13;
|
|
408
418
|
*
|
|
409
419
|
* a color — set the seed directly and the dials are bypassed:
|
|
410
420
|
* --ty-primary-seed: #76467c;
|
|
@@ -416,9 +426,23 @@ html:root,
|
|
|
416
426
|
* correct for ANY seed — light or dark. (Your exact pixel may
|
|
417
427
|
* appear nowhere; pin --ty-solid-X etc. if you need it literally.)
|
|
418
428
|
* --------------------------------------------------------------*/
|
|
429
|
+
/* BG TRACK — `--ty-bg-X` is the flavor's BASE ink at low alpha, real
|
|
430
|
+
* transparency, composited by the browser over whatever is actually
|
|
431
|
+
* underneath. Why this beats computing a tint lightness:
|
|
432
|
+
*
|
|
433
|
+
* - The ink is MID-SCALE (L 0.38–0.88), where the gamut is widest
|
|
434
|
+
* and `l-stop × l-factor` behaves — no near-white/near-black
|
|
435
|
+
* endpoint math, no chroma clipping, no hue drift.
|
|
436
|
+
* - Direction per mode is free: the same token darkens a light
|
|
437
|
+
* surface and lightens a dark one, on ANY surface level (content,
|
|
438
|
+
* elevated, floating), not just a nominal one.
|
|
439
|
+
* - l-factor points rather than shoves: it moves the ink a little,
|
|
440
|
+
* and only alpha × that movement reaches the tint.
|
|
441
|
+
*
|
|
442
|
+
* The wash amount is the --ty-a-bg-* dials (Tier 2 area). */
|
|
419
443
|
--ty-primary-seed-resolved: var(
|
|
420
444
|
--ty-primary-seed,
|
|
421
|
-
oklch(0.5 var(--ty-
|
|
445
|
+
oklch(0.5 var(--ty-primary-chroma) var(--ty-primary-hue))
|
|
422
446
|
);
|
|
423
447
|
--ty-success-seed-resolved: var(
|
|
424
448
|
--ty-success-seed,
|
|
@@ -464,19 +488,13 @@ html:root,
|
|
|
464
488
|
calc(c * var(--ty-c-faint-mult)) h
|
|
465
489
|
);
|
|
466
490
|
--ty-bg-primary: oklch(
|
|
467
|
-
from var(--ty-primary-
|
|
468
|
-
calc(var(--ty-l-bg-base) * var(--ty-primary-l-factor))
|
|
469
|
-
calc(c * var(--ty-c-bg-base-mult)) h
|
|
491
|
+
from var(--ty-color-primary) l c h / var(--ty-a-bg-base)
|
|
470
492
|
);
|
|
471
493
|
--ty-bg-primary-bold: oklch(
|
|
472
|
-
from var(--ty-primary-
|
|
473
|
-
calc(var(--ty-l-bg-bold) * var(--ty-primary-l-factor))
|
|
474
|
-
calc(c * var(--ty-c-bg-bold-mult)) h
|
|
494
|
+
from var(--ty-color-primary) l c h / var(--ty-a-bg-bold)
|
|
475
495
|
);
|
|
476
496
|
--ty-bg-primary-soft: oklch(
|
|
477
|
-
from var(--ty-primary-
|
|
478
|
-
calc(var(--ty-l-bg-soft) * var(--ty-primary-l-factor))
|
|
479
|
-
calc(c * var(--ty-c-bg-soft-mult)) h
|
|
497
|
+
from var(--ty-color-primary) l c h / var(--ty-a-bg-soft)
|
|
480
498
|
);
|
|
481
499
|
--ty-border-primary: var(--ty-color-primary-soft);
|
|
482
500
|
|
|
@@ -507,19 +525,13 @@ html:root,
|
|
|
507
525
|
calc(c * var(--ty-c-faint-mult)) h
|
|
508
526
|
);
|
|
509
527
|
--ty-bg-success: oklch(
|
|
510
|
-
from var(--ty-success-
|
|
511
|
-
calc(var(--ty-l-bg-base) * var(--ty-success-l-factor))
|
|
512
|
-
calc(c * var(--ty-c-bg-base-mult)) h
|
|
528
|
+
from var(--ty-color-success) l c h / var(--ty-a-bg-base)
|
|
513
529
|
);
|
|
514
530
|
--ty-bg-success-bold: oklch(
|
|
515
|
-
from var(--ty-success-
|
|
516
|
-
calc(var(--ty-l-bg-bold) * var(--ty-success-l-factor))
|
|
517
|
-
calc(c * var(--ty-c-bg-bold-mult)) h
|
|
531
|
+
from var(--ty-color-success) l c h / var(--ty-a-bg-bold)
|
|
518
532
|
);
|
|
519
533
|
--ty-bg-success-soft: oklch(
|
|
520
|
-
from var(--ty-success-
|
|
521
|
-
calc(var(--ty-l-bg-soft) * var(--ty-success-l-factor))
|
|
522
|
-
calc(c * var(--ty-c-bg-soft-mult)) h
|
|
534
|
+
from var(--ty-color-success) l c h / var(--ty-a-bg-soft)
|
|
523
535
|
);
|
|
524
536
|
--ty-border-success: var(--ty-color-success-soft);
|
|
525
537
|
|
|
@@ -550,19 +562,13 @@ html:root,
|
|
|
550
562
|
calc(c * var(--ty-c-faint-mult)) h
|
|
551
563
|
);
|
|
552
564
|
--ty-bg-danger: oklch(
|
|
553
|
-
from var(--ty-danger-
|
|
554
|
-
calc(var(--ty-l-bg-base) * var(--ty-danger-l-factor))
|
|
555
|
-
calc(c * var(--ty-c-bg-base-mult)) h
|
|
565
|
+
from var(--ty-color-danger) l c h / var(--ty-a-bg-base)
|
|
556
566
|
);
|
|
557
567
|
--ty-bg-danger-bold: oklch(
|
|
558
|
-
from var(--ty-danger-
|
|
559
|
-
calc(var(--ty-l-bg-bold) * var(--ty-danger-l-factor))
|
|
560
|
-
calc(c * var(--ty-c-bg-bold-mult)) h
|
|
568
|
+
from var(--ty-color-danger) l c h / var(--ty-a-bg-bold)
|
|
561
569
|
);
|
|
562
570
|
--ty-bg-danger-soft: oklch(
|
|
563
|
-
from var(--ty-danger-
|
|
564
|
-
calc(var(--ty-l-bg-soft) * var(--ty-danger-l-factor))
|
|
565
|
-
calc(c * var(--ty-c-bg-soft-mult)) h
|
|
571
|
+
from var(--ty-color-danger) l c h / var(--ty-a-bg-soft)
|
|
566
572
|
);
|
|
567
573
|
--ty-border-danger: var(--ty-color-danger-soft);
|
|
568
574
|
|
|
@@ -593,19 +599,13 @@ html:root,
|
|
|
593
599
|
calc(c * var(--ty-c-faint-mult)) h
|
|
594
600
|
);
|
|
595
601
|
--ty-bg-warning: oklch(
|
|
596
|
-
from var(--ty-warning-
|
|
597
|
-
calc(var(--ty-l-bg-base) * var(--ty-warning-l-factor))
|
|
598
|
-
calc(c * var(--ty-c-bg-base-mult)) h
|
|
602
|
+
from var(--ty-color-warning) l c h / var(--ty-a-bg-base)
|
|
599
603
|
);
|
|
600
604
|
--ty-bg-warning-bold: oklch(
|
|
601
|
-
from var(--ty-warning-
|
|
602
|
-
calc(var(--ty-l-bg-bold) * var(--ty-warning-l-factor))
|
|
603
|
-
calc(c * var(--ty-c-bg-bold-mult)) h
|
|
605
|
+
from var(--ty-color-warning) l c h / var(--ty-a-bg-bold)
|
|
604
606
|
);
|
|
605
607
|
--ty-bg-warning-soft: oklch(
|
|
606
|
-
from var(--ty-warning-
|
|
607
|
-
calc(var(--ty-l-bg-soft) * var(--ty-warning-l-factor))
|
|
608
|
-
calc(c * var(--ty-c-bg-soft-mult)) h
|
|
608
|
+
from var(--ty-color-warning) l c h / var(--ty-a-bg-soft)
|
|
609
609
|
);
|
|
610
610
|
--ty-border-warning: var(--ty-color-warning-soft);
|
|
611
611
|
|
|
@@ -636,19 +636,13 @@ html:root,
|
|
|
636
636
|
calc(c * var(--ty-c-faint-mult)) h
|
|
637
637
|
);
|
|
638
638
|
--ty-bg-neutral: oklch(
|
|
639
|
-
from var(--ty-neutral-
|
|
640
|
-
calc(var(--ty-l-bg-base) * var(--ty-neutral-l-factor))
|
|
641
|
-
calc(c * var(--ty-c-bg-base-mult)) h
|
|
639
|
+
from var(--ty-color-neutral) l c h / var(--ty-a-bg-base)
|
|
642
640
|
);
|
|
643
641
|
--ty-bg-neutral-bold: oklch(
|
|
644
|
-
from var(--ty-neutral-
|
|
645
|
-
calc(var(--ty-l-bg-bold) * var(--ty-neutral-l-factor))
|
|
646
|
-
calc(c * var(--ty-c-bg-bold-mult)) h
|
|
642
|
+
from var(--ty-color-neutral) l c h / var(--ty-a-bg-bold)
|
|
647
643
|
);
|
|
648
644
|
--ty-bg-neutral-soft: oklch(
|
|
649
|
-
from var(--ty-neutral-
|
|
650
|
-
calc(var(--ty-l-bg-soft) * var(--ty-neutral-l-factor))
|
|
651
|
-
calc(c * var(--ty-c-bg-soft-mult)) h
|
|
645
|
+
from var(--ty-color-neutral) l c h / var(--ty-a-bg-soft)
|
|
652
646
|
);
|
|
653
647
|
--ty-bg-neutral-strong: oklch(
|
|
654
648
|
from var(--ty-neutral-seed-resolved) var(--ty-l-bg-neutral-strong)
|
|
@@ -660,7 +654,7 @@ html:root,
|
|
|
660
654
|
);
|
|
661
655
|
|
|
662
656
|
/* ----------------------------------------------------------------
|
|
663
|
-
* Global neutral borders — own family, own L ladder (Tier
|
|
657
|
+
* Global neutral borders — own family, own L ladder (Tier 2).
|
|
664
658
|
* Tinted by the neutral seeds like everything grey, but NOT tied to
|
|
665
659
|
* the text emphasis curve or --ty-neutral-l-factor. Per-flavor
|
|
666
660
|
* accent borders (--ty-border-{flavor}) stay ink aliases — a colored
|
|
@@ -684,7 +678,7 @@ html:root,
|
|
|
684
678
|
|
|
685
679
|
/* ----------------------------------------------------------------
|
|
686
680
|
* Text ladder + surface borders — engine-wired versions of tokens
|
|
687
|
-
* tyrell.css hardcodes as hexes. Own L dials (Tier
|
|
681
|
+
* tyrell.css hardcodes as hexes. Own L dials (Tier 2), neutral
|
|
688
682
|
* hue/chroma tint. These out-rank the base hexes the same way every
|
|
689
683
|
* other token here does; a rebrand now reaches body text too.
|
|
690
684
|
* --------------------------------------------------------------*/
|
|
@@ -739,7 +733,7 @@ html:root,
|
|
|
739
733
|
);
|
|
740
734
|
|
|
741
735
|
/* ----------------------------------------------------------------
|
|
742
|
-
* Inputs — tied to neutral ramp so form controls retint with
|
|
736
|
+
* Inputs — tied to neutral ramp so form controls retint with primary.
|
|
743
737
|
* --------------------------------------------------------------*/
|
|
744
738
|
--ty-input-bg: var(--ty-surface-input);
|
|
745
739
|
--ty-input-color: var(--ty-color-neutral-strong);
|
|
@@ -758,10 +752,10 @@ html:root,
|
|
|
758
752
|
}
|
|
759
753
|
|
|
760
754
|
/* ----------------------------------------------------------------
|
|
761
|
-
* Tier
|
|
755
|
+
* Tier 5 — SOLID (implementation)
|
|
762
756
|
* Solid is its OWN system, NOT the text/emphasis ramp. The dials
|
|
763
757
|
* (--ty-solid-hover-l / -active-l / -strong-l / -soft-l and
|
|
764
|
-
* --ty-solid-l / -c / -h) live in SECTION 1, Tier
|
|
758
|
+
* --ty-solid-l / -c / -h) live in SECTION 1, Tier 5. Below is the
|
|
765
759
|
* derivation only: base fill bakes in the per-theme adjust (Axis B);
|
|
766
760
|
* hover/active/strong/soft offset the base by Axis A. Override any
|
|
767
761
|
* single --ty-solid-{flavor}-{state} to recolor just that segment.
|
|
@@ -769,8 +763,8 @@ html:root,
|
|
|
769
763
|
* Declared at `html:root` (specificity 0,1,1) — NOT plain `:root` (0,1,0) —
|
|
770
764
|
* on purpose: it must out-rank tyrell.css's hardcoded dark solids at
|
|
771
765
|
* `html.dark` (0,1,1). It wins light by specificity over base's `html{}`,
|
|
772
|
-
* and wins dark by source order over base's `html.dark` (
|
|
773
|
-
* That's what lets dark solids re-tint with --ty-
|
|
766
|
+
* and wins dark by source order over base's `html.dark` (theme layer loads after).
|
|
767
|
+
* That's what lets dark solids re-tint with --ty-primary-hue. Declared ONCE —
|
|
774
768
|
* the oklch(from var(--ty-color-*)) formulas resolve per-mode automatically,
|
|
775
769
|
* so no dark duplicate is needed.
|
|
776
770
|
* --------------------------------------------------------------*/
|
|
@@ -807,7 +801,7 @@ html:root,
|
|
|
807
801
|
* SOLID FOREGROUNDS — auto-contrast.
|
|
808
802
|
*
|
|
809
803
|
* Each fill gets a foreground picked from its OWN lightness, so a
|
|
810
|
-
* rebrand (--ty-
|
|
804
|
+
* rebrand (--ty-primary-hue / --ty-primary-chroma / any L-curve override)
|
|
811
805
|
* can't strand white text on a pale fill. Branchless, no JS:
|
|
812
806
|
*
|
|
813
807
|
* clamp(0, (threshold - l) * 1000, 1) -> 1 (white) when the fill
|
|
@@ -823,9 +817,19 @@ html:root,
|
|
|
823
817
|
* or set --ty-solid-fg-threshold: 1 to force white everywhere.
|
|
824
818
|
* --------------------------------------------------------------*/
|
|
825
819
|
|
|
826
|
-
/* Crossover point. Fills lighter than this get black text
|
|
827
|
-
|
|
828
|
-
|
|
820
|
+
/* Crossover point. Fills lighter than this get black text; higher =
|
|
821
|
+
prefers white, lower = prefers black.
|
|
822
|
+
|
|
823
|
+
Measured in-browser at stock dials, not guessed: the L at which black
|
|
824
|
+
and white give EQUAL WCAG contrast is 0.553 (success) / 0.564 (neutral)
|
|
825
|
+
/ 0.569 (warning) / 0.570 (primary) / 0.578 (danger) — a 0.025 spread,
|
|
826
|
+
so one global dial can serve every hue. Sweeping all 30 fills (15 ×
|
|
827
|
+
light/dark), the window where every fill gets the better of black/white
|
|
828
|
+
is (0.544, 0.588]; 0.57 sits ~mid-window. It previously read 0.62 —
|
|
829
|
+
above every flavor's break-even — which put white on `warning+` in both
|
|
830
|
+
modes: 4.23:1 light, 3.95:1 dark, each below AA and each the worse of
|
|
831
|
+
the two choices. Locked by test/solid-contrast.test.ts. */
|
|
832
|
+
--ty-solid-fg-threshold: 0.75;
|
|
829
833
|
|
|
830
834
|
--ty-solid-primary-fg: oklch(
|
|
831
835
|
from var(--ty-solid-primary)
|
|
@@ -984,15 +988,15 @@ html:root,
|
|
|
984
988
|
* work, switches just snap (the pre-TC37 behavior).
|
|
985
989
|
* ===================================================================== */
|
|
986
990
|
|
|
987
|
-
@property --ty-
|
|
991
|
+
@property --ty-primary-hue {
|
|
988
992
|
syntax: "<number>";
|
|
989
993
|
inherits: true;
|
|
990
|
-
initial-value:
|
|
994
|
+
initial-value: 252;
|
|
991
995
|
}
|
|
992
|
-
@property --ty-
|
|
996
|
+
@property --ty-primary-chroma {
|
|
993
997
|
syntax: "<number>";
|
|
994
998
|
inherits: true;
|
|
995
|
-
initial-value: 0.
|
|
999
|
+
initial-value: 0.08;
|
|
996
1000
|
}
|
|
997
1001
|
@property --ty-surface-chroma {
|
|
998
1002
|
syntax: "<number>";
|
|
@@ -1064,20 +1068,20 @@ html:root,
|
|
|
1064
1068
|
inherits: true;
|
|
1065
1069
|
initial-value: 0.88;
|
|
1066
1070
|
}
|
|
1067
|
-
@property --ty-
|
|
1068
|
-
syntax: "<
|
|
1071
|
+
@property --ty-a-bg-base {
|
|
1072
|
+
syntax: "<percentage>";
|
|
1069
1073
|
inherits: true;
|
|
1070
|
-
initial-value:
|
|
1074
|
+
initial-value: 9%;
|
|
1071
1075
|
}
|
|
1072
|
-
@property --ty-
|
|
1073
|
-
syntax: "<
|
|
1076
|
+
@property --ty-a-bg-bold {
|
|
1077
|
+
syntax: "<percentage>";
|
|
1074
1078
|
inherits: true;
|
|
1075
|
-
initial-value:
|
|
1079
|
+
initial-value: 17%;
|
|
1076
1080
|
}
|
|
1077
|
-
@property --ty-
|
|
1078
|
-
syntax: "<
|
|
1081
|
+
@property --ty-a-bg-soft {
|
|
1082
|
+
syntax: "<percentage>";
|
|
1079
1083
|
inherits: true;
|
|
1080
|
-
initial-value:
|
|
1084
|
+
initial-value: 4%;
|
|
1081
1085
|
}
|
|
1082
1086
|
@property --ty-l-text-strong {
|
|
1083
1087
|
syntax: "<number>";
|
|
@@ -1219,21 +1223,6 @@ html:root,
|
|
|
1219
1223
|
inherits: true;
|
|
1220
1224
|
initial-value: 0.46;
|
|
1221
1225
|
}
|
|
1222
|
-
@property --ty-c-bg-base-mult {
|
|
1223
|
-
syntax: "<number>";
|
|
1224
|
-
inherits: true;
|
|
1225
|
-
initial-value: 0.15;
|
|
1226
|
-
}
|
|
1227
|
-
@property --ty-c-bg-bold-mult {
|
|
1228
|
-
syntax: "<number>";
|
|
1229
|
-
inherits: true;
|
|
1230
|
-
initial-value: 0.38;
|
|
1231
|
-
}
|
|
1232
|
-
@property --ty-c-bg-soft-mult {
|
|
1233
|
-
syntax: "<number>";
|
|
1234
|
-
inherits: true;
|
|
1235
|
-
initial-value: 0.08;
|
|
1236
|
-
}
|
|
1237
1226
|
@property --ty-primary-l-factor {
|
|
1238
1227
|
syntax: "<number>";
|
|
1239
1228
|
inherits: true;
|
|
@@ -1346,7 +1335,7 @@ html:root,
|
|
|
1346
1335
|
@property --ty-solid-fg-threshold {
|
|
1347
1336
|
syntax: "<number>";
|
|
1348
1337
|
inherits: true;
|
|
1349
|
-
initial-value: 0.
|
|
1338
|
+
initial-value: 0.75;
|
|
1350
1339
|
}
|
|
1351
1340
|
@property --ty-focus-ring-alpha {
|
|
1352
1341
|
syntax: "<percentage>";
|
|
@@ -1384,21 +1373,21 @@ html:root,
|
|
|
1384
1373
|
html,
|
|
1385
1374
|
[data-ty-theme] {
|
|
1386
1375
|
transition-property:
|
|
1387
|
-
--ty-
|
|
1388
|
-
--ty-success-
|
|
1389
|
-
--ty-
|
|
1390
|
-
--ty-neutral-
|
|
1391
|
-
--ty-l-
|
|
1392
|
-
--ty-
|
|
1393
|
-
--ty-l-text-
|
|
1394
|
-
--ty-l-border-
|
|
1395
|
-
--ty-l-border, --ty-l-border
|
|
1396
|
-
--ty-l-
|
|
1397
|
-
--ty-l-surface-
|
|
1398
|
-
--ty-l-solid-neutral
|
|
1399
|
-
--ty-l-bg-neutral-
|
|
1400
|
-
--ty-c-
|
|
1401
|
-
--ty-c-
|
|
1376
|
+
--ty-primary-hue, --ty-primary-chroma, --ty-surface-chroma,
|
|
1377
|
+
--ty-success-hue, --ty-success-chroma, --ty-warning-hue,
|
|
1378
|
+
--ty-warning-chroma, --ty-danger-hue, --ty-danger-chroma,
|
|
1379
|
+
--ty-neutral-hue, --ty-neutral-chroma, --ty-l-strong, --ty-l-bold,
|
|
1380
|
+
--ty-l-base, --ty-l-soft, --ty-l-faint, --ty-a-bg-base, --ty-a-bg-bold,
|
|
1381
|
+
--ty-a-bg-soft, --ty-l-text-strong, --ty-l-text-bold, --ty-l-text-base,
|
|
1382
|
+
--ty-l-text-soft, --ty-l-text-faint, --ty-l-border-content,
|
|
1383
|
+
--ty-l-border-elevated, --ty-l-border-floating, --ty-l-border-strong,
|
|
1384
|
+
--ty-l-border-bold, --ty-l-border, --ty-l-border-soft,
|
|
1385
|
+
--ty-l-border-faint, --ty-l-surface-canvas, --ty-l-surface-content,
|
|
1386
|
+
--ty-l-surface-elevated, --ty-l-surface-floating, --ty-l-surface-input,
|
|
1387
|
+
--ty-l-solid-neutral, --ty-l-solid-neutral-strong,
|
|
1388
|
+
--ty-l-bg-neutral-strong, --ty-l-bg-neutral-faint,
|
|
1389
|
+
--ty-c-bg-neutral-faint-mult, --ty-c-strong-mult, --ty-c-bold-mult,
|
|
1390
|
+
--ty-c-base-mult, --ty-c-soft-mult, --ty-c-faint-mult,
|
|
1402
1391
|
--ty-primary-l-factor, --ty-success-l-factor, --ty-warning-l-factor,
|
|
1403
1392
|
--ty-danger-l-factor, --ty-neutral-l-factor, --ty-primary-solid-l,
|
|
1404
1393
|
--ty-success-solid-l, --ty-warning-solid-l, --ty-danger-solid-l,
|