@crewlethq/tokens 0.130.1 → 0.130.2
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/dist/css/brand-scope.css +4 -4
- package/dist/css/brand.css +29 -3
- package/package.json +1 -1
package/dist/css/brand-scope.css
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
.crewlet-brand-scope__layer {
|
|
27
27
|
--crewlet-brand-accent: var(--brand-primary-on-dark, var(--brand-primary));
|
|
28
|
-
--crewlet-brand-ink: color-mix(in oklab, var(--crewlet-brand-accent) 55%, white);
|
|
28
|
+
--crewlet-brand-ink: color( from color-mix(in oklab, var(--crewlet-brand-accent) 55%, white) srgb-linear calc(r + (1 - r) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g + (1 - g) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b + (1 - b) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)))) );
|
|
29
29
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 16%, transparent);
|
|
30
30
|
--crewlet-brand-ground: var(--brand-dark-ground);
|
|
31
31
|
--crewlet-brand-text: initial;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
@media (prefers-color-scheme: light) {
|
|
63
63
|
:root:not([data-theme="dark"]) .crewlet-brand-scope__layer {
|
|
64
64
|
--crewlet-brand-accent: var(--brand-primary);
|
|
65
|
-
--crewlet-brand-ink: color-mix(in oklab, var(--crewlet-brand-accent) 70%, black);
|
|
65
|
+
--crewlet-brand-ink: color( from color-mix(in oklab, var(--crewlet-brand-accent) 70%, black) srgb-linear calc(r * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b))) calc(g * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b))) calc(b * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b))) );
|
|
66
66
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 12.5%, transparent);
|
|
67
67
|
--crewlet-brand-ground: var(--brand-light-ground);
|
|
68
68
|
--crewlet-brand-text: var(--brand-text);
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:root[data-theme="light"] .crewlet-brand-scope__layer,
|
|
73
73
|
.crewlet-brand-scope[data-mode="light"] > .crewlet-brand-scope__layer {
|
|
74
74
|
--crewlet-brand-accent: var(--brand-primary);
|
|
75
|
-
--crewlet-brand-ink: color-mix(in oklab, var(--crewlet-brand-accent) 70%, black);
|
|
75
|
+
--crewlet-brand-ink: color( from color-mix(in oklab, var(--crewlet-brand-accent) 70%, black) srgb-linear calc(r * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b))) calc(g * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b))) calc(b * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b))) );
|
|
76
76
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 12.5%, transparent);
|
|
77
77
|
--crewlet-brand-ground: var(--brand-light-ground);
|
|
78
78
|
--crewlet-brand-text: var(--brand-text);
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
|
|
114
114
|
.crewlet-brand-scope[data-mode="dark"] > .crewlet-brand-scope__layer {
|
|
115
115
|
--crewlet-brand-accent: var(--brand-primary-on-dark, var(--brand-primary));
|
|
116
|
-
--crewlet-brand-ink: color-mix(in oklab, var(--crewlet-brand-accent) 55%, white);
|
|
116
|
+
--crewlet-brand-ink: color( from color-mix(in oklab, var(--crewlet-brand-accent) 55%, white) srgb-linear calc(r + (1 - r) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g + (1 - g) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b + (1 - b) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)))) );
|
|
117
117
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 16%, transparent);
|
|
118
118
|
--crewlet-brand-ground: var(--brand-dark-ground);
|
|
119
119
|
--crewlet-brand-text: initial;
|
package/dist/css/brand.css
CHANGED
|
@@ -53,6 +53,17 @@
|
|
|
53
53
|
* ink, soft fills, selected edge, deep stop and glow are mixed from it with
|
|
54
54
|
* `color-mix()` in each mode, and the label on it is whichever of black and
|
|
55
55
|
* white clears more contrast on it. A body face alone sets the headings too.
|
|
56
|
+
*
|
|
57
|
+
* THE INK IS TEXT, SO IT CLEARS 4.5:1. The accent's ink (the accent written as
|
|
58
|
+
* words: a link, a sample's link) is the accent mixed toward the ink that
|
|
59
|
+
* clears more on the mode's ground, then taken further toward it only where
|
|
60
|
+
* that is still short of 4.5:1, in linear light, where a colour's WCAG
|
|
61
|
+
* luminance is the weighted sum of its channels: on a light ground its
|
|
62
|
+
* channels are scaled until its luminance is at most 0.15 (4.5:1 on any
|
|
63
|
+
* ground of 0.85 or lighter), on a dark ground lifted toward white until it
|
|
64
|
+
* is at least 0.265 (4.5:1 on any ground of 0.02 or darker). Mixed alone, a
|
|
65
|
+
* light brand colour wrote a 3.3:1 ink. An ink that already clears is the mix
|
|
66
|
+
* as it was.
|
|
56
67
|
* The focus ring stays the theme's: its 3:1 floor is measured for every theme,
|
|
57
68
|
* and a mix of an arbitrary colour cannot be. `--color-brand-accent-rgb` stays
|
|
58
69
|
* the theme's too, because a channel triple cannot be derived in CSS; a page
|
|
@@ -62,7 +73,12 @@
|
|
|
62
73
|
/* Dark, the bare root's mode, as the theme contract has it. */
|
|
63
74
|
:root {
|
|
64
75
|
--crewlet-brand-accent: var(--brand-primary-on-dark, var(--brand-primary));
|
|
65
|
-
--crewlet-brand-ink: color
|
|
76
|
+
--crewlet-brand-ink: color(
|
|
77
|
+
from color-mix(in oklab, var(--crewlet-brand-accent) 55%, white) srgb-linear
|
|
78
|
+
calc(r + (1 - r) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b))))
|
|
79
|
+
calc(g + (1 - g) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b))))
|
|
80
|
+
calc(b + (1 - b) * max(0, (0.265 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / (1 - (0.2126 * r + 0.7152 * g + 0.0722 * b))))
|
|
81
|
+
);
|
|
66
82
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 16%, transparent);
|
|
67
83
|
--crewlet-brand-ground: var(--brand-dark-ground);
|
|
68
84
|
/* The brand's text is written for its light ground; on a dark one the
|
|
@@ -117,7 +133,12 @@
|
|
|
117
133
|
@media (prefers-color-scheme: light) {
|
|
118
134
|
:root:not([data-theme="dark"]) {
|
|
119
135
|
--crewlet-brand-accent: var(--brand-primary);
|
|
120
|
-
--crewlet-brand-ink: color
|
|
136
|
+
--crewlet-brand-ink: color(
|
|
137
|
+
from color-mix(in oklab, var(--crewlet-brand-accent) 70%, black) srgb-linear
|
|
138
|
+
calc(r * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b)))
|
|
139
|
+
calc(g * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b)))
|
|
140
|
+
calc(b * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b)))
|
|
141
|
+
);
|
|
121
142
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 12.5%, transparent);
|
|
122
143
|
--crewlet-brand-ground: var(--brand-light-ground);
|
|
123
144
|
--crewlet-brand-text: var(--brand-text);
|
|
@@ -126,7 +147,12 @@
|
|
|
126
147
|
|
|
127
148
|
:root[data-theme="light"] {
|
|
128
149
|
--crewlet-brand-accent: var(--brand-primary);
|
|
129
|
-
--crewlet-brand-ink: color
|
|
150
|
+
--crewlet-brand-ink: color(
|
|
151
|
+
from color-mix(in oklab, var(--crewlet-brand-accent) 70%, black) srgb-linear
|
|
152
|
+
calc(r * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b)))
|
|
153
|
+
calc(g * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b)))
|
|
154
|
+
calc(b * min(1, 0.15 / (0.2126 * r + 0.7152 * g + 0.0722 * b)))
|
|
155
|
+
);
|
|
130
156
|
--crewlet-brand-soft: color-mix(in srgb, var(--crewlet-brand-accent) 12.5%, transparent);
|
|
131
157
|
--crewlet-brand-ground: var(--brand-light-ground);
|
|
132
158
|
--crewlet-brand-text: var(--brand-text);
|
package/package.json
CHANGED