@wildmason/aegis 1.11.0 → 1.12.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/dist/fesm2022/wildmason-aegis.mjs +20 -20
- package/dist/fesm2022/wildmason-aegis.mjs.map +1 -1
- package/fonts/CascadiaCode-OFL.txt +94 -94
- package/inputs.css +16 -8
- package/package.json +4 -3
- package/themes.css +125 -20
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
Copyright (c) 2019 - Present, Microsoft Corporation,
|
|
2
|
-
with Reserved Font Name Cascadia Code.
|
|
3
|
-
|
|
4
|
-
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
-
This license is copied below, and is also available with a FAQ at:
|
|
6
|
-
http://scripts.sil.org/OFL
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-----------------------------------------------------------
|
|
10
|
-
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
-
-----------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
PREAMBLE
|
|
14
|
-
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
-
development of collaborative font projects, to support the font creation
|
|
16
|
-
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
-
open framework in which fonts may be shared and improved in partnership
|
|
18
|
-
with others.
|
|
19
|
-
|
|
20
|
-
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
-
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
-
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
-
redistributed and/or sold with any software provided that any reserved
|
|
24
|
-
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
-
however, cannot be released under any other type of license. The
|
|
26
|
-
requirement for fonts to remain under this license does not apply
|
|
27
|
-
to any document created using the fonts or their derivatives.
|
|
28
|
-
|
|
29
|
-
DEFINITIONS
|
|
30
|
-
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
-
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
-
include source files, build scripts and documentation.
|
|
33
|
-
|
|
34
|
-
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
-
copyright statement(s).
|
|
36
|
-
|
|
37
|
-
"Original Version" refers to the collection of Font Software components as
|
|
38
|
-
distributed by the Copyright Holder(s).
|
|
39
|
-
|
|
40
|
-
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
-
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
-
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
-
new environment.
|
|
44
|
-
|
|
45
|
-
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
-
writer or other person who contributed to the Font Software.
|
|
47
|
-
|
|
48
|
-
PERMISSION & CONDITIONS
|
|
49
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
-
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
-
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
-
Software, subject to the following conditions:
|
|
53
|
-
|
|
54
|
-
1) Neither the Font Software nor any of its individual components,
|
|
55
|
-
in Original or Modified Versions, may be sold by itself.
|
|
56
|
-
|
|
57
|
-
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
-
redistributed and/or sold with any software, provided that each copy
|
|
59
|
-
contains the above copyright notice and this license. These can be
|
|
60
|
-
included either as stand-alone text files, human-readable headers or
|
|
61
|
-
in the appropriate machine-readable metadata fields within text or
|
|
62
|
-
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
-
|
|
64
|
-
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
-
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
-
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
-
presented to the users.
|
|
68
|
-
|
|
69
|
-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
-
Software shall not be used to promote, endorse or advertise any
|
|
71
|
-
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
-
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
-
permission.
|
|
74
|
-
|
|
75
|
-
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
-
must be distributed entirely under this license, and must not be
|
|
77
|
-
distributed under any other license. The requirement for fonts to
|
|
78
|
-
remain under this license does not apply to any document created
|
|
79
|
-
using the Font Software.
|
|
80
|
-
|
|
81
|
-
TERMINATION
|
|
82
|
-
This license becomes null and void if any of the above conditions are
|
|
83
|
-
not met.
|
|
84
|
-
|
|
85
|
-
DISCLAIMER
|
|
86
|
-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
-
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
-
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
-
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
-
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
-
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
1
|
+
Copyright (c) 2019 - Present, Microsoft Corporation,
|
|
2
|
+
with Reserved Font Name Cascadia Code.
|
|
3
|
+
|
|
4
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
+
This license is copied below, and is also available with a FAQ at:
|
|
6
|
+
http://scripts.sil.org/OFL
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
PREAMBLE
|
|
14
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
15
|
+
development of collaborative font projects, to support the font creation
|
|
16
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
17
|
+
open framework in which fonts may be shared and improved in partnership
|
|
18
|
+
with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
22
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply
|
|
27
|
+
to any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
DEFINITIONS
|
|
30
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
31
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
32
|
+
include source files, build scripts and documentation.
|
|
33
|
+
|
|
34
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
35
|
+
copyright statement(s).
|
|
36
|
+
|
|
37
|
+
"Original Version" refers to the collection of Font Software components as
|
|
38
|
+
distributed by the Copyright Holder(s).
|
|
39
|
+
|
|
40
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
41
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
42
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
43
|
+
new environment.
|
|
44
|
+
|
|
45
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
46
|
+
writer or other person who contributed to the Font Software.
|
|
47
|
+
|
|
48
|
+
PERMISSION & CONDITIONS
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
50
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
51
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
52
|
+
Software, subject to the following conditions:
|
|
53
|
+
|
|
54
|
+
1) Neither the Font Software nor any of its individual components,
|
|
55
|
+
in Original or Modified Versions, may be sold by itself.
|
|
56
|
+
|
|
57
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
58
|
+
redistributed and/or sold with any software, provided that each copy
|
|
59
|
+
contains the above copyright notice and this license. These can be
|
|
60
|
+
included either as stand-alone text files, human-readable headers or
|
|
61
|
+
in the appropriate machine-readable metadata fields within text or
|
|
62
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
63
|
+
|
|
64
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
65
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
66
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
67
|
+
presented to the users.
|
|
68
|
+
|
|
69
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
70
|
+
Software shall not be used to promote, endorse or advertise any
|
|
71
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
72
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
73
|
+
permission.
|
|
74
|
+
|
|
75
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
76
|
+
must be distributed entirely under this license, and must not be
|
|
77
|
+
distributed under any other license. The requirement for fonts to
|
|
78
|
+
remain under this license does not apply to any document created
|
|
79
|
+
using the Font Software.
|
|
80
|
+
|
|
81
|
+
TERMINATION
|
|
82
|
+
This license becomes null and void if any of the above conditions are
|
|
83
|
+
not met.
|
|
84
|
+
|
|
85
|
+
DISCLAIMER
|
|
86
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
89
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
90
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
91
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
92
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
94
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/inputs.css
CHANGED
|
@@ -164,7 +164,10 @@
|
|
|
164
164
|
|
|
165
165
|
.wm-field-error {
|
|
166
166
|
font-size: 11px;
|
|
167
|
-
|
|
167
|
+
/* `-readable`, not `--wm-color-danger`. The tone is the saturated colour
|
|
168
|
+
that names the status; at 11px on the theme's own surface it was as low
|
|
169
|
+
as 2.11:1. See the note in themes.css. */
|
|
170
|
+
color: var(--wm-color-danger-readable);
|
|
168
171
|
line-height: 1.4;
|
|
169
172
|
}
|
|
170
173
|
|
|
@@ -806,9 +809,14 @@ select.wm-input {
|
|
|
806
809
|
Error message block — .wm-error-msg
|
|
807
810
|
============================================================
|
|
808
811
|
Inline danger block displayed below a field (or at the top of
|
|
809
|
-
a form) to communicate validation or server errors.
|
|
810
|
-
|
|
811
|
-
|
|
812
|
+
a form) to communicate validation or server errors.
|
|
813
|
+
|
|
814
|
+
The label is `--wm-color-<tone>-readable`, NOT `--wm-color-<tone>`: the
|
|
815
|
+
block's own tint moves its background toward its text, so the tone that
|
|
816
|
+
names the status is not the tone that can be read on it. Measured on the
|
|
817
|
+
raw tone, this block's label ran 2.18:1 on arctic-night. The claim that it
|
|
818
|
+
is "readable across all 12 themes" is now guarded rather than asserted —
|
|
819
|
+
see scripts/check-semantic-contrast.mjs.
|
|
812
820
|
|
|
813
821
|
Usage:
|
|
814
822
|
<div class="wm-error-msg">Incorrect username or password.</div>
|
|
@@ -816,7 +824,7 @@ select.wm-input {
|
|
|
816
824
|
|
|
817
825
|
.wm-error-msg {
|
|
818
826
|
background-color: var(--wm-color-danger-bg);
|
|
819
|
-
color: var(--wm-color-danger);
|
|
827
|
+
color: var(--wm-color-danger-readable);
|
|
820
828
|
border: 1px solid var(--wm-color-danger-border);
|
|
821
829
|
border-radius: var(--wm-radius-sm);
|
|
822
830
|
padding: 10px 12px;
|
|
@@ -826,7 +834,7 @@ select.wm-input {
|
|
|
826
834
|
|
|
827
835
|
.wm-success-msg {
|
|
828
836
|
background-color: var(--wm-color-success-bg);
|
|
829
|
-
color: var(--wm-color-success);
|
|
837
|
+
color: var(--wm-color-success-readable);
|
|
830
838
|
border: 1px solid var(--wm-color-success-border);
|
|
831
839
|
border-radius: var(--wm-radius-sm);
|
|
832
840
|
padding: 10px 12px;
|
|
@@ -836,7 +844,7 @@ select.wm-input {
|
|
|
836
844
|
|
|
837
845
|
.wm-warning-msg {
|
|
838
846
|
background-color: var(--wm-color-warning-bg);
|
|
839
|
-
color: var(--wm-color-warning);
|
|
847
|
+
color: var(--wm-color-warning-readable);
|
|
840
848
|
border: 1px solid var(--wm-color-warning-border);
|
|
841
849
|
border-radius: var(--wm-radius-sm);
|
|
842
850
|
padding: 10px 12px;
|
|
@@ -847,7 +855,7 @@ select.wm-input {
|
|
|
847
855
|
.wm-info-msg {
|
|
848
856
|
background-color: color-mix(in srgb, var(--wm-color-accent) 8%, transparent);
|
|
849
857
|
color: var(--wm-text-secondary);
|
|
850
|
-
border: 1px solid
|
|
858
|
+
border: 1px solid var(--wm-color-accent-border);
|
|
851
859
|
border-radius: var(--wm-radius-sm);
|
|
852
860
|
padding: 10px 12px;
|
|
853
861
|
font-size: 13px;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildmason/aegis",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Aegis design system \u00e2\u20ac\u201d CSS tokens and Angular component library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"check:offline-fonts": "node scripts/check-offline-fonts.mjs",
|
|
7
|
-
"build": "npm run check:offline-fonts && npm run check:destructive-contrast && ng-packagr -p ng-package.json",
|
|
7
|
+
"build": "npm run check:offline-fonts && npm run check:destructive-contrast && npm run check:semantic-contrast && ng-packagr -p ng-package.json",
|
|
8
8
|
"prepublishOnly": "npm run build",
|
|
9
|
-
"check:destructive-contrast": "node scripts/check-destructive-contrast.mjs"
|
|
9
|
+
"check:destructive-contrast": "node scripts/check-destructive-contrast.mjs",
|
|
10
|
+
"check:semantic-contrast": "node scripts/check-semantic-contrast.mjs"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"dist",
|
package/themes.css
CHANGED
|
@@ -161,46 +161,120 @@
|
|
|
161
161
|
* text-primary is by construction the highest-contrast colour against that
|
|
162
162
|
* theme's surfaces, so mixing toward it lightens on dark themes and darkens
|
|
163
163
|
* on light ones — one rule, correct in both directions, and a new theme gets
|
|
164
|
-
* a correct edge for free.
|
|
165
|
-
*
|
|
166
|
-
*
|
|
164
|
+
* a correct edge for free.
|
|
165
|
+
*
|
|
166
|
+
* This is now an alias. The status rims below adopted the same rule, and a
|
|
167
|
+
* boundary is a boundary; keeping two copies of one formula is how the two
|
|
168
|
+
* drift apart. The ratio moved 70/30 -> 65/35 when they merged, because the
|
|
169
|
+
* rims answer to a neighbour the button's edge never had: the tint the block
|
|
170
|
+
* is FILLED with. 70/30 cleared every bare surface and still measured 2.93:1
|
|
171
|
+
* against wildmason's danger tint over `--wm-bg-float`. See the note on the
|
|
172
|
+
* rims for the sweep.
|
|
167
173
|
*/
|
|
168
|
-
--wm-color-danger-edge: color-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
);
|
|
174
|
+
--wm-color-danger-edge: var(--wm-color-danger-border);
|
|
175
|
+
|
|
176
|
+
/* Status tints. 8% of the tone over whatever is behind them, which is what
|
|
177
|
+
makes them read as "this block is an error" without becoming a fill. */
|
|
173
178
|
--wm-color-danger-bg: color-mix(
|
|
174
179
|
in srgb,
|
|
175
180
|
var(--wm-color-danger) 8%,
|
|
176
181
|
transparent
|
|
177
182
|
);
|
|
178
|
-
--wm-color-danger-border: color-mix(
|
|
179
|
-
in srgb,
|
|
180
|
-
var(--wm-color-danger) 25%,
|
|
181
|
-
transparent
|
|
182
|
-
);
|
|
183
183
|
--wm-color-success-bg: color-mix(
|
|
184
184
|
in srgb,
|
|
185
185
|
var(--wm-color-success) 8%,
|
|
186
186
|
transparent
|
|
187
187
|
);
|
|
188
|
-
--wm-color-success-border: color-mix(
|
|
189
|
-
in srgb,
|
|
190
|
-
var(--wm-color-success) 25%,
|
|
191
|
-
transparent
|
|
192
|
-
);
|
|
193
188
|
--wm-color-warning-bg: color-mix(
|
|
194
189
|
in srgb,
|
|
195
190
|
var(--wm-color-warning) 8%,
|
|
196
191
|
transparent
|
|
197
192
|
);
|
|
193
|
+
|
|
194
|
+
/* Status rims, on the same 70/30 rule the destructive button's edge uses.
|
|
195
|
+
*
|
|
196
|
+
* These were a 25% mix toward `transparent`, which meant their contrast was
|
|
197
|
+
* a fraction of however far the tone already sat from the surface — and on a
|
|
198
|
+
* theme whose tone is close to its own surfaces, that fraction is nothing.
|
|
199
|
+
* Measured across every theme and every tone, the old rule produced 1.18:1
|
|
200
|
+
* to 1.88:1 against the surface behind it. Not one theme, not one tone, ever
|
|
201
|
+
* reached WCAG 1.4.11's 3:1, and no percentage could fix it: at 100% the rim
|
|
202
|
+
* IS the tone, which is only 2.77:1 from `--wm-bg-raised` on wildmason.
|
|
203
|
+
*
|
|
204
|
+
* Mixing toward `--wm-text-primary` is the rule that works, for the reason
|
|
205
|
+
* the edge above records — it lightens on dark themes and darkens on light
|
|
206
|
+
* ones, so one ratio is correct in both directions. `--wm-color-danger-edge`
|
|
207
|
+
* is now an alias rather than a second copy of the same rule.
|
|
208
|
+
*
|
|
209
|
+
* 65/35, not the 70/30 the button's edge was tuned at. A rim has TWO
|
|
210
|
+
* neighbours — the surface the block sits on, and the tint the block is
|
|
211
|
+
* filled with — and the button's edge only ever had the first. Swept at 2%
|
|
212
|
+
* steps against both: 70/30 fails at 2.93:1 (wildmason danger, against its
|
|
213
|
+
* own tint over `--wm-bg-float`), 68/32 is the first pass and clears by
|
|
214
|
+
* 0.00, and 65/35 clears at 3.10:1. The extra headroom is deliberate — a
|
|
215
|
+
* bar met exactly is one hex rounding away from being missed.
|
|
216
|
+
*
|
|
217
|
+
* Guarded by scripts/check-semantic-contrast.mjs against both neighbours. A
|
|
218
|
+
* rim that separates from the page while vanishing into its own fill is
|
|
219
|
+
* still an invisible rim.
|
|
220
|
+
*/
|
|
221
|
+
--wm-color-danger-border: color-mix(
|
|
222
|
+
in srgb,
|
|
223
|
+
var(--wm-color-danger) 65%,
|
|
224
|
+
var(--wm-text-primary)
|
|
225
|
+
);
|
|
226
|
+
--wm-color-success-border: color-mix(
|
|
227
|
+
in srgb,
|
|
228
|
+
var(--wm-color-success) 65%,
|
|
229
|
+
var(--wm-text-primary)
|
|
230
|
+
);
|
|
198
231
|
--wm-color-warning-border: color-mix(
|
|
199
232
|
in srgb,
|
|
200
|
-
var(--wm-color-warning)
|
|
201
|
-
|
|
233
|
+
var(--wm-color-warning) 65%,
|
|
234
|
+
var(--wm-text-primary)
|
|
202
235
|
);
|
|
203
236
|
|
|
237
|
+
/* `.wm-info-msg` is the fourth callout and had the same 25%-toward-
|
|
238
|
+
transparent rim as the other three, so it gets the same repair. The accent
|
|
239
|
+
needs no `-readable` sibling here because an info callout's text is
|
|
240
|
+
`--wm-text-secondary`, not the accent — it is the only one of the four
|
|
241
|
+
whose label was never tinted by its own tone. */
|
|
242
|
+
--wm-color-accent-border: color-mix(
|
|
243
|
+
in srgb,
|
|
244
|
+
var(--wm-color-accent) 65%,
|
|
245
|
+
var(--wm-text-primary)
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
/* "Readable" status tones — the colour a status uses when it is TEXT.
|
|
249
|
+
*
|
|
250
|
+
* Same split, and the same reason, as `--wm-color-accent-readable`: one
|
|
251
|
+
* token cannot be both the saturated colour that NAMES a status and the
|
|
252
|
+
* colour that colour can be READ in. A tone is used as a fill, a dot, an
|
|
253
|
+
* icon and a chart mark, where saturation is the point; it is also the label
|
|
254
|
+
* of `.wm-field-error`, `.wm-error-msg` and the error toast, where contrast
|
|
255
|
+
* is the point.
|
|
256
|
+
*
|
|
257
|
+
* On several themes the two requirements do not merely pull apart, they
|
|
258
|
+
* cross. Wildmason is the clearest case: its surfaces run #2a2c2b to
|
|
259
|
+
* #464a49, and NO red clears 4.5:1 on both ends while staying saturated —
|
|
260
|
+
* light enough for `--wm-bg-float` is washed out on `--wm-bg-base`, and dark
|
|
261
|
+
* enough for base is invisible on float. That is the same collision the
|
|
262
|
+
* destructive button hit on arctic-night, and it takes the same answer: a
|
|
263
|
+
* second token, not a compromise on the first.
|
|
264
|
+
*
|
|
265
|
+
* Each override is the NEAREST value to its theme's own tone, found by
|
|
266
|
+
* holding hue and chroma in OKLCH and walking lightness only, so the red
|
|
267
|
+
* stays that theme's red. Every one clears 4.5:1 and APCA Lc 60 against
|
|
268
|
+
* `--wm-bg-base`, `--wm-bg-raised` and `--wm-bg-float`, and against each of
|
|
269
|
+
* those wearing the tone's own 8% tint — the tint is the binding case,
|
|
270
|
+
* because it moves the background toward the text.
|
|
271
|
+
*
|
|
272
|
+
* Themes whose tone is already readable inherit it unchanged.
|
|
273
|
+
*/
|
|
274
|
+
--wm-color-danger-readable: var(--wm-color-danger);
|
|
275
|
+
--wm-color-warning-readable: var(--wm-color-warning);
|
|
276
|
+
--wm-color-success-readable: var(--wm-color-success);
|
|
277
|
+
|
|
204
278
|
/* "Readable" accent — used in `color:` (text) contexts where WCAG AA
|
|
205
279
|
contrast (4.5:1) must be met against bg-base / bg-raised / bg-float.
|
|
206
280
|
Defaults to the theme's --wm-color-accent so most themes need no
|
|
@@ -248,6 +322,9 @@
|
|
|
248
322
|
--wm-color-success: #485600;
|
|
249
323
|
--wm-color-warning: #705400;
|
|
250
324
|
--wm-color-danger: #bd2c29;
|
|
325
|
+
--wm-color-danger-readable: #770007;
|
|
326
|
+
--wm-color-warning-readable: #553f00;
|
|
327
|
+
--wm-color-success-readable: #3c4801;
|
|
251
328
|
|
|
252
329
|
/* Item type colors (Works-specific) */
|
|
253
330
|
--wm-color-task: #1b6ca5;
|
|
@@ -314,6 +391,9 @@
|
|
|
314
391
|
--wm-color-success: #085a50;
|
|
315
392
|
--wm-color-warning: #8c4000;
|
|
316
393
|
--wm-color-danger: #dc2626;
|
|
394
|
+
--wm-color-danger-readable: #720006;
|
|
395
|
+
--wm-color-warning-readable: #672e01;
|
|
396
|
+
--wm-color-success-readable: #02473f;
|
|
317
397
|
|
|
318
398
|
/* Item type colors */
|
|
319
399
|
--wm-color-task: #2563eb;
|
|
@@ -387,6 +467,9 @@
|
|
|
387
467
|
--wm-color-warning: #ebcb8b;
|
|
388
468
|
--wm-color-danger: #bf616a;
|
|
389
469
|
--wm-color-danger-solid: #a34049;
|
|
470
|
+
--wm-color-danger-readable: #fec0c3;
|
|
471
|
+
--wm-color-warning-readable: #eccc8c;
|
|
472
|
+
--wm-color-success-readable: #bed8a3;
|
|
390
473
|
|
|
391
474
|
/* Item type colors */
|
|
392
475
|
--wm-color-task: #88c0d0;
|
|
@@ -460,6 +543,7 @@
|
|
|
460
543
|
--wm-color-warning: #f1fa8c;
|
|
461
544
|
--wm-color-danger: #ff5555;
|
|
462
545
|
--wm-color-danger-solid: #cf4545;
|
|
546
|
+
--wm-color-danger-readable: #febdb7;
|
|
463
547
|
|
|
464
548
|
/* Item type colors */
|
|
465
549
|
--wm-color-task: #8be9fd;
|
|
@@ -533,6 +617,8 @@
|
|
|
533
617
|
--wm-color-warning: #f0b464;
|
|
534
618
|
--wm-color-danger: #f07878;
|
|
535
619
|
--wm-color-danger-solid: #b65b5b;
|
|
620
|
+
--wm-color-danger-readable: #fea7a4;
|
|
621
|
+
--wm-color-success-readable: #6dcfb0;
|
|
536
622
|
|
|
537
623
|
/* Item type colors */
|
|
538
624
|
--wm-color-task: #70a8f0;
|
|
@@ -606,6 +692,9 @@
|
|
|
606
692
|
--wm-color-warning: #d4a85a;
|
|
607
693
|
--wm-color-danger: #e07878;
|
|
608
694
|
--wm-color-danger-solid: #af5e5e;
|
|
695
|
+
--wm-color-danger-readable: #feb0ae;
|
|
696
|
+
--wm-color-warning-readable: #eabe70;
|
|
697
|
+
--wm-color-success-readable: #89d4af;
|
|
609
698
|
|
|
610
699
|
/* Item type colors */
|
|
611
700
|
--wm-color-task: #80a8e0;
|
|
@@ -672,6 +761,9 @@
|
|
|
672
761
|
--wm-color-success: #006036;
|
|
673
762
|
--wm-color-warning: #6b4500;
|
|
674
763
|
--wm-color-danger: #c4302c;
|
|
764
|
+
--wm-color-danger-readable: #640005;
|
|
765
|
+
--wm-color-warning-readable: #4e3101;
|
|
766
|
+
--wm-color-success-readable: #003f22;
|
|
675
767
|
|
|
676
768
|
/* Item type colors */
|
|
677
769
|
--wm-color-task: #1e6ea8;
|
|
@@ -752,6 +844,8 @@
|
|
|
752
844
|
--wm-color-warning: #fd971f;
|
|
753
845
|
--wm-color-danger: #f92672;
|
|
754
846
|
--wm-color-danger-solid: #e02267;
|
|
847
|
+
--wm-color-danger-readable: #ffb1bf;
|
|
848
|
+
--wm-color-warning-readable: #feb878;
|
|
755
849
|
|
|
756
850
|
/* Item type colors */
|
|
757
851
|
--wm-color-task: #66d9ef;
|
|
@@ -825,6 +919,9 @@
|
|
|
825
919
|
--wm-color-warning: #d4830a;
|
|
826
920
|
--wm-color-danger: #e05c5c;
|
|
827
921
|
--wm-color-danger-solid: #c35050;
|
|
922
|
+
--wm-color-danger-readable: #ffa09b;
|
|
923
|
+
--wm-color-warning-readable: #fba744;
|
|
924
|
+
--wm-color-success-readable: #60ce93;
|
|
828
925
|
|
|
829
926
|
/* Item type colors */
|
|
830
927
|
--wm-color-task: #8ab4d8;
|
|
@@ -898,6 +995,9 @@
|
|
|
898
995
|
--wm-color-warning: #d29922;
|
|
899
996
|
--wm-color-danger: #f85149;
|
|
900
997
|
--wm-color-danger-solid: #d0443d;
|
|
998
|
+
--wm-color-danger-readable: #fea398;
|
|
999
|
+
--wm-color-warning-readable: #ebb042;
|
|
1000
|
+
--wm-color-success-readable: #5bd268;
|
|
901
1001
|
|
|
902
1002
|
/* Item type colors */
|
|
903
1003
|
--wm-color-task: #58a6ff;
|
|
@@ -977,6 +1077,8 @@
|
|
|
977
1077
|
--wm-color-warning: #ebcb8b;
|
|
978
1078
|
--wm-color-danger: #bf616a;
|
|
979
1079
|
--wm-color-danger-solid: #b45b64;
|
|
1080
|
+
--wm-color-danger-readable: #febec1;
|
|
1081
|
+
--wm-color-success-readable: #b2d8b2;
|
|
980
1082
|
|
|
981
1083
|
/* Item type colors — Wildmason selection */
|
|
982
1084
|
--wm-color-task: #82a682;
|
|
@@ -1043,6 +1145,9 @@
|
|
|
1043
1145
|
--wm-color-success: #3a6b48;
|
|
1044
1146
|
--wm-color-warning: #8a5a1f;
|
|
1045
1147
|
--wm-color-danger: #ac3838;
|
|
1148
|
+
--wm-color-danger-readable: #6b000d;
|
|
1149
|
+
--wm-color-warning-readable: #573301;
|
|
1150
|
+
--wm-color-success-readable: #134525;
|
|
1046
1151
|
|
|
1047
1152
|
/* Item types */
|
|
1048
1153
|
--wm-color-task: #3a5a43;
|