@wildmason/aegis 1.10.2 → 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 +30 -12
- package/package.json +5 -3
- package/themes.css +164 -12
|
@@ -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;
|
|
@@ -1129,15 +1137,25 @@ select.wm-input {
|
|
|
1129
1137
|
color: var(--wm-text-primary);
|
|
1130
1138
|
}
|
|
1131
1139
|
|
|
1140
|
+
/* Fill and edge come from separate tokens, and the split is the whole point.
|
|
1141
|
+
*
|
|
1142
|
+
* `--wm-color-danger` is tuned for danger as TEXT, so on dark themes it is a
|
|
1143
|
+
* light red and white on it failed WCAG AA on 8 of 12 themes (worst 2.74:1).
|
|
1144
|
+
* `--wm-color-danger-solid` is dark enough for the label on every theme;
|
|
1145
|
+
* `--wm-color-danger-edge` supplies the 3:1 component boundary WCAG 1.4.11
|
|
1146
|
+
* asks for, which a fill dark enough for white text cannot always provide by
|
|
1147
|
+
* itself — on arctic-night the two constraints cross outright. See themes.css
|
|
1148
|
+
* for the derivation and the APCA/WCAG divergence behind it. */
|
|
1132
1149
|
.wm-btn--destructive {
|
|
1133
|
-
background-color: var(--wm-color-danger);
|
|
1134
|
-
border-color: var(--wm-color-danger);
|
|
1150
|
+
background-color: var(--wm-color-danger-solid);
|
|
1151
|
+
border-color: var(--wm-color-danger-edge);
|
|
1135
1152
|
color: #ffffff;
|
|
1136
1153
|
}
|
|
1137
1154
|
|
|
1155
|
+
/* Only the fill darkens on hover. Darkening the edge too would eat into the
|
|
1156
|
+
* boundary contrast the edge exists to guarantee. */
|
|
1138
1157
|
.wm-btn--destructive:hover:not(:disabled) {
|
|
1139
|
-
background-color: color-mix(in srgb, var(--wm-color-danger) 85%, black);
|
|
1140
|
-
border-color: color-mix(in srgb, var(--wm-color-danger) 85%, black);
|
|
1158
|
+
background-color: color-mix(in srgb, var(--wm-color-danger-solid) 85%, black);
|
|
1141
1159
|
}
|
|
1142
1160
|
|
|
1143
1161
|
.wm-btn--flat {
|
package/package.json
CHANGED
|
@@ -1,11 +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 && ng-packagr -p ng-package.json",
|
|
8
|
-
"prepublishOnly": "npm run build"
|
|
7
|
+
"build": "npm run check:offline-fonts && npm run check:destructive-contrast && npm run check:semantic-contrast && ng-packagr -p ng-package.json",
|
|
8
|
+
"prepublishOnly": "npm run build",
|
|
9
|
+
"check:destructive-contrast": "node scripts/check-destructive-contrast.mjs",
|
|
10
|
+
"check:semantic-contrast": "node scripts/check-semantic-contrast.mjs"
|
|
9
11
|
},
|
|
10
12
|
"files": [
|
|
11
13
|
"dist",
|
package/themes.css
CHANGED
|
@@ -40,6 +40,15 @@
|
|
|
40
40
|
- Large text and UI components: 3.0:1 minimum
|
|
41
41
|
(WCAG 1.4.11 Non-text Contrast — applies to --wm-border-input)
|
|
42
42
|
|
|
43
|
+
One pair needed a second token to hold that line: white on
|
|
44
|
+
--wm-color-danger, the destructive button's fill, failed AA on 8 of the 12
|
|
45
|
+
themes because --wm-color-danger is tuned for danger as TEXT and is a light
|
|
46
|
+
red on dark themes. The fill now comes from --wm-color-danger-solid and the
|
|
47
|
+
component boundary from --wm-color-danger-edge. Worth knowing if you are
|
|
48
|
+
auditing: APCA passed 11 of those 12 (Lc >= 60) — WCAG 2.x under-rates red
|
|
49
|
+
backgrounds — so the two models genuinely disagreed here and both bars are
|
|
50
|
+
now cleared rather than one being argued away.
|
|
51
|
+
|
|
43
52
|
Placeholder text (--wm-text-placeholder) is intentionally lower contrast.
|
|
44
53
|
WCAG 2.2 Understanding 1.4.3 explicitly exempts placeholder text from
|
|
45
54
|
contrast requirements. Inputs MUST have a visible label; placeholder is
|
|
@@ -131,37 +140,141 @@
|
|
|
131
140
|
|
|
132
141
|
/* Derived tokens — computed at scope, valid for all themes */
|
|
133
142
|
--wm-bg-active: color-mix(in srgb, var(--wm-color-accent) 10%, transparent);
|
|
143
|
+
/* Destructive-button fill and edge.
|
|
144
|
+
*
|
|
145
|
+
* `--wm-color-danger` is tuned for danger as TEXT on the theme's own
|
|
146
|
+
* background, so on dark themes it is a light red. White on it fails WCAG AA
|
|
147
|
+
* on 8 of the 12 themes — worst 2.74:1 on twilight-peach — even though APCA
|
|
148
|
+
* passes 11 of 12 (Lc >= 60). That divergence is real, not a rounding
|
|
149
|
+
* argument: WCAG 2.x's luminance formula under-rates red backgrounds. Both
|
|
150
|
+
* bars have to clear, so the fill gets its own token.
|
|
151
|
+
*
|
|
152
|
+
* Themes whose danger is already dark enough inherit it unchanged; the rest
|
|
153
|
+
* override below with a darkened value chosen so white clears 4.5:1 AND
|
|
154
|
+
* Lc 60, hover included.
|
|
155
|
+
*/
|
|
156
|
+
--wm-color-danger-solid: var(--wm-color-danger);
|
|
157
|
+
|
|
158
|
+
/* The button's boundary, per WCAG 1.4.11's 3:1 for a component edge.
|
|
159
|
+
*
|
|
160
|
+
* Derived from the theme's own text colour rather than a fixed lightening:
|
|
161
|
+
* text-primary is by construction the highest-contrast colour against that
|
|
162
|
+
* theme's surfaces, so mixing toward it lightens on dark themes and darkens
|
|
163
|
+
* on light ones — one rule, correct in both directions, and a new theme gets
|
|
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.
|
|
173
|
+
*/
|
|
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. */
|
|
134
178
|
--wm-color-danger-bg: color-mix(
|
|
135
179
|
in srgb,
|
|
136
180
|
var(--wm-color-danger) 8%,
|
|
137
181
|
transparent
|
|
138
182
|
);
|
|
139
|
-
--wm-color-danger-border: color-mix(
|
|
140
|
-
in srgb,
|
|
141
|
-
var(--wm-color-danger) 25%,
|
|
142
|
-
transparent
|
|
143
|
-
);
|
|
144
183
|
--wm-color-success-bg: color-mix(
|
|
145
184
|
in srgb,
|
|
146
185
|
var(--wm-color-success) 8%,
|
|
147
186
|
transparent
|
|
148
187
|
);
|
|
149
|
-
--wm-color-success-border: color-mix(
|
|
150
|
-
in srgb,
|
|
151
|
-
var(--wm-color-success) 25%,
|
|
152
|
-
transparent
|
|
153
|
-
);
|
|
154
188
|
--wm-color-warning-bg: color-mix(
|
|
155
189
|
in srgb,
|
|
156
190
|
var(--wm-color-warning) 8%,
|
|
157
191
|
transparent
|
|
158
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
|
+
);
|
|
159
231
|
--wm-color-warning-border: color-mix(
|
|
160
232
|
in srgb,
|
|
161
|
-
var(--wm-color-warning)
|
|
162
|
-
|
|
233
|
+
var(--wm-color-warning) 65%,
|
|
234
|
+
var(--wm-text-primary)
|
|
163
235
|
);
|
|
164
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
|
+
|
|
165
278
|
/* "Readable" accent — used in `color:` (text) contexts where WCAG AA
|
|
166
279
|
contrast (4.5:1) must be met against bg-base / bg-raised / bg-float.
|
|
167
280
|
Defaults to the theme's --wm-color-accent so most themes need no
|
|
@@ -209,6 +322,9 @@
|
|
|
209
322
|
--wm-color-success: #485600;
|
|
210
323
|
--wm-color-warning: #705400;
|
|
211
324
|
--wm-color-danger: #bd2c29;
|
|
325
|
+
--wm-color-danger-readable: #770007;
|
|
326
|
+
--wm-color-warning-readable: #553f00;
|
|
327
|
+
--wm-color-success-readable: #3c4801;
|
|
212
328
|
|
|
213
329
|
/* Item type colors (Works-specific) */
|
|
214
330
|
--wm-color-task: #1b6ca5;
|
|
@@ -275,6 +391,9 @@
|
|
|
275
391
|
--wm-color-success: #085a50;
|
|
276
392
|
--wm-color-warning: #8c4000;
|
|
277
393
|
--wm-color-danger: #dc2626;
|
|
394
|
+
--wm-color-danger-readable: #720006;
|
|
395
|
+
--wm-color-warning-readable: #672e01;
|
|
396
|
+
--wm-color-success-readable: #02473f;
|
|
278
397
|
|
|
279
398
|
/* Item type colors */
|
|
280
399
|
--wm-color-task: #2563eb;
|
|
@@ -347,6 +466,10 @@
|
|
|
347
466
|
--wm-color-success: #b5cf9a;
|
|
348
467
|
--wm-color-warning: #ebcb8b;
|
|
349
468
|
--wm-color-danger: #bf616a;
|
|
469
|
+
--wm-color-danger-solid: #a34049;
|
|
470
|
+
--wm-color-danger-readable: #fec0c3;
|
|
471
|
+
--wm-color-warning-readable: #eccc8c;
|
|
472
|
+
--wm-color-success-readable: #bed8a3;
|
|
350
473
|
|
|
351
474
|
/* Item type colors */
|
|
352
475
|
--wm-color-task: #88c0d0;
|
|
@@ -419,6 +542,8 @@
|
|
|
419
542
|
--wm-color-success: #50fa7b;
|
|
420
543
|
--wm-color-warning: #f1fa8c;
|
|
421
544
|
--wm-color-danger: #ff5555;
|
|
545
|
+
--wm-color-danger-solid: #cf4545;
|
|
546
|
+
--wm-color-danger-readable: #febdb7;
|
|
422
547
|
|
|
423
548
|
/* Item type colors */
|
|
424
549
|
--wm-color-task: #8be9fd;
|
|
@@ -491,6 +616,9 @@
|
|
|
491
616
|
--wm-color-success: #5cbfa0;
|
|
492
617
|
--wm-color-warning: #f0b464;
|
|
493
618
|
--wm-color-danger: #f07878;
|
|
619
|
+
--wm-color-danger-solid: #b65b5b;
|
|
620
|
+
--wm-color-danger-readable: #fea7a4;
|
|
621
|
+
--wm-color-success-readable: #6dcfb0;
|
|
494
622
|
|
|
495
623
|
/* Item type colors */
|
|
496
624
|
--wm-color-task: #70a8f0;
|
|
@@ -563,6 +691,10 @@
|
|
|
563
691
|
--wm-color-success: #7ac4a0;
|
|
564
692
|
--wm-color-warning: #d4a85a;
|
|
565
693
|
--wm-color-danger: #e07878;
|
|
694
|
+
--wm-color-danger-solid: #af5e5e;
|
|
695
|
+
--wm-color-danger-readable: #feb0ae;
|
|
696
|
+
--wm-color-warning-readable: #eabe70;
|
|
697
|
+
--wm-color-success-readable: #89d4af;
|
|
566
698
|
|
|
567
699
|
/* Item type colors */
|
|
568
700
|
--wm-color-task: #80a8e0;
|
|
@@ -629,6 +761,9 @@
|
|
|
629
761
|
--wm-color-success: #006036;
|
|
630
762
|
--wm-color-warning: #6b4500;
|
|
631
763
|
--wm-color-danger: #c4302c;
|
|
764
|
+
--wm-color-danger-readable: #640005;
|
|
765
|
+
--wm-color-warning-readable: #4e3101;
|
|
766
|
+
--wm-color-success-readable: #003f22;
|
|
632
767
|
|
|
633
768
|
/* Item type colors */
|
|
634
769
|
--wm-color-task: #1e6ea8;
|
|
@@ -708,6 +843,9 @@
|
|
|
708
843
|
--wm-color-success: #a6e22e;
|
|
709
844
|
--wm-color-warning: #fd971f;
|
|
710
845
|
--wm-color-danger: #f92672;
|
|
846
|
+
--wm-color-danger-solid: #e02267;
|
|
847
|
+
--wm-color-danger-readable: #ffb1bf;
|
|
848
|
+
--wm-color-warning-readable: #feb878;
|
|
711
849
|
|
|
712
850
|
/* Item type colors */
|
|
713
851
|
--wm-color-task: #66d9ef;
|
|
@@ -780,6 +918,10 @@
|
|
|
780
918
|
--wm-color-success: #4aba80;
|
|
781
919
|
--wm-color-warning: #d4830a;
|
|
782
920
|
--wm-color-danger: #e05c5c;
|
|
921
|
+
--wm-color-danger-solid: #c35050;
|
|
922
|
+
--wm-color-danger-readable: #ffa09b;
|
|
923
|
+
--wm-color-warning-readable: #fba744;
|
|
924
|
+
--wm-color-success-readable: #60ce93;
|
|
783
925
|
|
|
784
926
|
/* Item type colors */
|
|
785
927
|
--wm-color-task: #8ab4d8;
|
|
@@ -852,6 +994,10 @@
|
|
|
852
994
|
--wm-color-success: #3fb950;
|
|
853
995
|
--wm-color-warning: #d29922;
|
|
854
996
|
--wm-color-danger: #f85149;
|
|
997
|
+
--wm-color-danger-solid: #d0443d;
|
|
998
|
+
--wm-color-danger-readable: #fea398;
|
|
999
|
+
--wm-color-warning-readable: #ebb042;
|
|
1000
|
+
--wm-color-success-readable: #5bd268;
|
|
855
1001
|
|
|
856
1002
|
/* Item type colors */
|
|
857
1003
|
--wm-color-task: #58a6ff;
|
|
@@ -930,6 +1076,9 @@
|
|
|
930
1076
|
--wm-color-success: #a0c5a0;
|
|
931
1077
|
--wm-color-warning: #ebcb8b;
|
|
932
1078
|
--wm-color-danger: #bf616a;
|
|
1079
|
+
--wm-color-danger-solid: #b45b64;
|
|
1080
|
+
--wm-color-danger-readable: #febec1;
|
|
1081
|
+
--wm-color-success-readable: #b2d8b2;
|
|
933
1082
|
|
|
934
1083
|
/* Item type colors — Wildmason selection */
|
|
935
1084
|
--wm-color-task: #82a682;
|
|
@@ -996,6 +1145,9 @@
|
|
|
996
1145
|
--wm-color-success: #3a6b48;
|
|
997
1146
|
--wm-color-warning: #8a5a1f;
|
|
998
1147
|
--wm-color-danger: #ac3838;
|
|
1148
|
+
--wm-color-danger-readable: #6b000d;
|
|
1149
|
+
--wm-color-warning-readable: #573301;
|
|
1150
|
+
--wm-color-success-readable: #134525;
|
|
999
1151
|
|
|
1000
1152
|
/* Item types */
|
|
1001
1153
|
--wm-color-task: #3a5a43;
|