@wildmason/aegis 1.11.0 → 1.13.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 +173 -41
|
@@ -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.13.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,54 +161,152 @@
|
|
|
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
|
|
|
204
|
-
/*
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
+
|
|
278
|
+
/* "Readable" accent — the accent in `color:` (text) contexts: active tab
|
|
279
|
+
labels, current nav items, link-style buttons, the selected option in
|
|
280
|
+
`wm-select`. `--wm-color-accent` itself stays the interactive fill, where
|
|
281
|
+
3:1 (WCAG 1.4.11) is the bar.
|
|
282
|
+
|
|
283
|
+
The bar here is APCA Lc 60 AND WCAG AA 4.5:1, against bg-base, bg-raised
|
|
284
|
+
and bg-float, and against each of those wearing the accent's own 10% tint
|
|
285
|
+
— `--wm-bg-active`, which is exactly what `.wm-select-option.is-selected`
|
|
286
|
+
paints behind this colour.
|
|
287
|
+
|
|
288
|
+
APCA is the binding one, and it is the reason every theme now carries an
|
|
289
|
+
override. This token was tuned to WCAG alone, and on that bar it looked
|
|
290
|
+
healthy: the worst reading across all twelve themes was 4.52:1, comfortably
|
|
291
|
+
passing. On APCA, ELEVEN of the twelve failed Lc 60 on a bare surface, and
|
|
292
|
+
all twelve failed once the tint was included — including the two themes
|
|
293
|
+
that already carried a hand-tuned override for the WCAG failure. The two
|
|
294
|
+
models disagree here in the opposite direction to the destructive button,
|
|
295
|
+
where WCAG was the strict one: WCAG 2.x's luminance formula is generous to
|
|
296
|
+
mid-tone coloured text on a mid-tone ground, which is precisely this case.
|
|
297
|
+
Both bars are held rather than one being argued away.
|
|
298
|
+
|
|
299
|
+
`--wm-bg-float` binds on ten of the twelve. `sage-linen` binds on
|
|
300
|
+
bg-raised instead, because a light theme's sidebar is conventionally darker
|
|
301
|
+
than its canvas and its float is the lighter surface.
|
|
302
|
+
|
|
303
|
+
Each value is the nearest colour to the theme's own accent that clears
|
|
304
|
+
Lc 61, found by holding hue and chroma in OKLCH and walking lightness only,
|
|
305
|
+
so it stays that theme's blue, pink or sage. The target is 61 rather than
|
|
306
|
+
the 60 that is actually required: tuning to the bar exactly put
|
|
307
|
+
posh-sandalwood on Lc 60.0, which the guard read as a failure and which a
|
|
308
|
+
single hex rounding would have flipped either way. Guarded by
|
|
309
|
+
scripts/check-semantic-contrast.mjs. */
|
|
212
310
|
--wm-color-accent-readable: var(--wm-color-accent);
|
|
213
311
|
}
|
|
214
312
|
|
|
@@ -243,11 +341,15 @@
|
|
|
243
341
|
--wm-color-accent: #105987;
|
|
244
342
|
--wm-color-accent-hover: #2aa198;
|
|
245
343
|
--wm-color-accent-text: #ffffff;
|
|
344
|
+
--wm-color-accent-readable: #004066;
|
|
246
345
|
|
|
247
346
|
/* Semantic */
|
|
248
347
|
--wm-color-success: #485600;
|
|
249
348
|
--wm-color-warning: #705400;
|
|
250
349
|
--wm-color-danger: #bd2c29;
|
|
350
|
+
--wm-color-danger-readable: #770007;
|
|
351
|
+
--wm-color-warning-readable: #553f00;
|
|
352
|
+
--wm-color-success-readable: #3c4801;
|
|
251
353
|
|
|
252
354
|
/* Item type colors (Works-specific) */
|
|
253
355
|
--wm-color-task: #1b6ca5;
|
|
@@ -309,11 +411,15 @@
|
|
|
309
411
|
--wm-color-accent: #1b4a9e;
|
|
310
412
|
--wm-color-accent-hover: #3061af;
|
|
311
413
|
--wm-color-accent-text: #ffffff;
|
|
414
|
+
--wm-color-accent-readable: #033285;
|
|
312
415
|
|
|
313
416
|
/* Semantic */
|
|
314
417
|
--wm-color-success: #085a50;
|
|
315
418
|
--wm-color-warning: #8c4000;
|
|
316
419
|
--wm-color-danger: #dc2626;
|
|
420
|
+
--wm-color-danger-readable: #720006;
|
|
421
|
+
--wm-color-warning-readable: #672e01;
|
|
422
|
+
--wm-color-success-readable: #02473f;
|
|
317
423
|
|
|
318
424
|
/* Item type colors */
|
|
319
425
|
--wm-color-task: #2563eb;
|
|
@@ -381,12 +487,16 @@
|
|
|
381
487
|
--wm-color-accent: #8fc4d3;
|
|
382
488
|
--wm-color-accent-hover: #81a1c1;
|
|
383
489
|
--wm-color-accent-text: #2e3440;
|
|
490
|
+
--wm-color-accent-readable: #a5dbea;
|
|
384
491
|
|
|
385
492
|
/* Semantic */
|
|
386
493
|
--wm-color-success: #b5cf9a;
|
|
387
494
|
--wm-color-warning: #ebcb8b;
|
|
388
495
|
--wm-color-danger: #bf616a;
|
|
389
496
|
--wm-color-danger-solid: #a34049;
|
|
497
|
+
--wm-color-danger-readable: #fec0c3;
|
|
498
|
+
--wm-color-warning-readable: #eccc8c;
|
|
499
|
+
--wm-color-success-readable: #bed8a3;
|
|
390
500
|
|
|
391
501
|
/* Item type colors */
|
|
392
502
|
--wm-color-task: #88c0d0;
|
|
@@ -454,12 +564,14 @@
|
|
|
454
564
|
--wm-color-accent: #c9a7fa;
|
|
455
565
|
--wm-color-accent-hover: #ff79c6;
|
|
456
566
|
--wm-color-accent-text: #282a36;
|
|
567
|
+
--wm-color-accent-readable: #dcc6fe;
|
|
457
568
|
|
|
458
569
|
/* Semantic */
|
|
459
570
|
--wm-color-success: #50fa7b;
|
|
460
571
|
--wm-color-warning: #f1fa8c;
|
|
461
572
|
--wm-color-danger: #ff5555;
|
|
462
573
|
--wm-color-danger-solid: #cf4545;
|
|
574
|
+
--wm-color-danger-readable: #febdb7;
|
|
463
575
|
|
|
464
576
|
/* Item type colors */
|
|
465
577
|
--wm-color-task: #8be9fd;
|
|
@@ -527,12 +639,15 @@
|
|
|
527
639
|
--wm-color-accent: #f5986a;
|
|
528
640
|
--wm-color-accent-hover: #f08458;
|
|
529
641
|
--wm-color-accent-text: #1c1d2e;
|
|
642
|
+
--wm-color-accent-readable: #fead85;
|
|
530
643
|
|
|
531
644
|
/* Semantic */
|
|
532
645
|
--wm-color-success: #5cbfa0;
|
|
533
646
|
--wm-color-warning: #f0b464;
|
|
534
647
|
--wm-color-danger: #f07878;
|
|
535
648
|
--wm-color-danger-solid: #b65b5b;
|
|
649
|
+
--wm-color-danger-readable: #fea7a4;
|
|
650
|
+
--wm-color-success-readable: #6dcfb0;
|
|
536
651
|
|
|
537
652
|
/* Item type colors */
|
|
538
653
|
--wm-color-task: #70a8f0;
|
|
@@ -600,12 +715,16 @@
|
|
|
600
715
|
--wm-color-accent: #c4a8d8;
|
|
601
716
|
--wm-color-accent-hover: #9e7abf;
|
|
602
717
|
--wm-color-accent-text: #1a1715;
|
|
718
|
+
--wm-color-accent-readable: #d8bced;
|
|
603
719
|
|
|
604
720
|
/* Semantic */
|
|
605
721
|
--wm-color-success: #7ac4a0;
|
|
606
722
|
--wm-color-warning: #d4a85a;
|
|
607
723
|
--wm-color-danger: #e07878;
|
|
608
724
|
--wm-color-danger-solid: #af5e5e;
|
|
725
|
+
--wm-color-danger-readable: #feb0ae;
|
|
726
|
+
--wm-color-warning-readable: #eabe70;
|
|
727
|
+
--wm-color-success-readable: #89d4af;
|
|
609
728
|
|
|
610
729
|
/* Item type colors */
|
|
611
730
|
--wm-color-task: #80a8e0;
|
|
@@ -667,11 +786,15 @@
|
|
|
667
786
|
--wm-color-accent: #185c78;
|
|
668
787
|
--wm-color-accent-hover: #1e6e96;
|
|
669
788
|
--wm-color-accent-text: #ffffff;
|
|
789
|
+
--wm-color-accent-readable: #00374c;
|
|
670
790
|
|
|
671
791
|
/* Semantic */
|
|
672
792
|
--wm-color-success: #006036;
|
|
673
793
|
--wm-color-warning: #6b4500;
|
|
674
794
|
--wm-color-danger: #c4302c;
|
|
795
|
+
--wm-color-danger-readable: #640005;
|
|
796
|
+
--wm-color-warning-readable: #4e3101;
|
|
797
|
+
--wm-color-success-readable: #003f22;
|
|
675
798
|
|
|
676
799
|
/* Item type colors */
|
|
677
800
|
--wm-color-task: #1e6ea8;
|
|
@@ -739,19 +862,17 @@
|
|
|
739
862
|
--wm-color-accent: #f92672;
|
|
740
863
|
--wm-color-accent-hover: #fd971f;
|
|
741
864
|
--wm-color-accent-text: #1c1c15;
|
|
742
|
-
/*
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
background (3.6:1); #ff8ac4 clears 5.03:1 on bg-float while
|
|
746
|
-
staying in the hot-pink hue family. Used wherever components
|
|
747
|
-
reference --wm-color-accent-readable instead of --wm-color-accent. */
|
|
748
|
-
--wm-color-accent-readable: #ff8ac4;
|
|
865
|
+
/* #ff8ac4 was chosen for the WCAG failure (#f92672 is 2.9:1 on bg-float) and
|
|
866
|
+
cleared 5.03:1, but measures APCA Lc 51.4 there. See the note in :root. */
|
|
867
|
+
--wm-color-accent-readable: #ffabd1;
|
|
749
868
|
|
|
750
869
|
/* Semantic */
|
|
751
870
|
--wm-color-success: #a6e22e;
|
|
752
871
|
--wm-color-warning: #fd971f;
|
|
753
872
|
--wm-color-danger: #f92672;
|
|
754
873
|
--wm-color-danger-solid: #e02267;
|
|
874
|
+
--wm-color-danger-readable: #ffb1bf;
|
|
875
|
+
--wm-color-warning-readable: #feb878;
|
|
755
876
|
|
|
756
877
|
/* Item type colors */
|
|
757
878
|
--wm-color-task: #66d9ef;
|
|
@@ -819,12 +940,16 @@
|
|
|
819
940
|
--wm-color-accent: #c09d06;
|
|
820
941
|
--wm-color-accent-hover: #b15000;
|
|
821
942
|
--wm-color-accent-text: #060810;
|
|
943
|
+
--wm-color-accent-readable: #dcb83a;
|
|
822
944
|
|
|
823
945
|
/* Semantic */
|
|
824
946
|
--wm-color-success: #4aba80;
|
|
825
947
|
--wm-color-warning: #d4830a;
|
|
826
948
|
--wm-color-danger: #e05c5c;
|
|
827
949
|
--wm-color-danger-solid: #c35050;
|
|
950
|
+
--wm-color-danger-readable: #ffa09b;
|
|
951
|
+
--wm-color-warning-readable: #fba744;
|
|
952
|
+
--wm-color-success-readable: #60ce93;
|
|
828
953
|
|
|
829
954
|
/* Item type colors */
|
|
830
955
|
--wm-color-task: #8ab4d8;
|
|
@@ -892,12 +1017,16 @@
|
|
|
892
1017
|
--wm-color-accent: #3fb950;
|
|
893
1018
|
--wm-color-accent-hover: #58a6ff;
|
|
894
1019
|
--wm-color-accent-text: #0d1117;
|
|
1020
|
+
--wm-color-accent-readable: #5dd46a;
|
|
895
1021
|
|
|
896
1022
|
/* Semantic */
|
|
897
1023
|
--wm-color-success: #3fb950;
|
|
898
1024
|
--wm-color-warning: #d29922;
|
|
899
1025
|
--wm-color-danger: #f85149;
|
|
900
1026
|
--wm-color-danger-solid: #d0443d;
|
|
1027
|
+
--wm-color-danger-readable: #fea398;
|
|
1028
|
+
--wm-color-warning-readable: #ebb042;
|
|
1029
|
+
--wm-color-success-readable: #5bd268;
|
|
901
1030
|
|
|
902
1031
|
/* Item type colors */
|
|
903
1032
|
--wm-color-task: #58a6ff;
|
|
@@ -965,18 +1094,17 @@
|
|
|
965
1094
|
--wm-color-accent: #82a682;
|
|
966
1095
|
--wm-color-accent-hover: #94b894;
|
|
967
1096
|
--wm-color-accent-text: #161817;
|
|
968
|
-
/*
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
while staying in the moss-green hue family. Used wherever components
|
|
972
|
-
reference --wm-color-accent-readable instead of --wm-color-accent. */
|
|
973
|
-
--wm-color-accent-readable: #9bc99b;
|
|
1097
|
+
/* #9bc99b was chosen for the WCAG failure (#82a682 is 3.30:1 on bg-float) and
|
|
1098
|
+
cleared 4.74:1, but measures APCA Lc 54.3 there. See the note in :root. */
|
|
1099
|
+
--wm-color-accent-readable: #abdaab;
|
|
974
1100
|
|
|
975
1101
|
/* Semantic */
|
|
976
1102
|
--wm-color-success: #a0c5a0;
|
|
977
1103
|
--wm-color-warning: #ebcb8b;
|
|
978
1104
|
--wm-color-danger: #bf616a;
|
|
979
1105
|
--wm-color-danger-solid: #b45b64;
|
|
1106
|
+
--wm-color-danger-readable: #febec1;
|
|
1107
|
+
--wm-color-success-readable: #b2d8b2;
|
|
980
1108
|
|
|
981
1109
|
/* Item type colors — Wildmason selection */
|
|
982
1110
|
--wm-color-task: #82a682;
|
|
@@ -1038,11 +1166,15 @@
|
|
|
1038
1166
|
--wm-color-accent: #3a5a43;
|
|
1039
1167
|
--wm-color-accent-hover: #2c4733;
|
|
1040
1168
|
--wm-color-accent-text: #eaf0e7;
|
|
1169
|
+
--wm-color-accent-readable: #203f2a;
|
|
1041
1170
|
|
|
1042
1171
|
/* Semantic */
|
|
1043
1172
|
--wm-color-success: #3a6b48;
|
|
1044
1173
|
--wm-color-warning: #8a5a1f;
|
|
1045
1174
|
--wm-color-danger: #ac3838;
|
|
1175
|
+
--wm-color-danger-readable: #6b000d;
|
|
1176
|
+
--wm-color-warning-readable: #573301;
|
|
1177
|
+
--wm-color-success-readable: #134525;
|
|
1046
1178
|
|
|
1047
1179
|
/* Item types */
|
|
1048
1180
|
--wm-color-task: #3a5a43;
|