@w6w/ui 0.1.0 → 0.2.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/CHANGELOG.md +40 -0
- package/README.md +25 -8
- package/dist/AppPicker.d.ts +1 -0
- package/dist/ConfirmModal-ChoiGy2K.cjs +11 -0
- package/dist/ConfirmModal-ChoiGy2K.cjs.map +1 -0
- package/dist/{ConfirmModal-sY1tzkBO.js → ConfirmModal-Wx3i8F1n.js} +4470 -4446
- package/dist/ConfirmModal-Wx3i8F1n.js.map +1 -0
- package/dist/ConnectionHeader.d.ts +19 -0
- package/dist/EditConnectionModal.d.ts +21 -0
- package/dist/app-pages.d.ts +3 -0
- package/dist/code.cjs +1 -1
- package/dist/code.mjs +1 -0
- package/dist/code.mjs.map +1 -1
- package/dist/components/AuthFieldsForm.d.ts +8 -1
- package/dist/components/CallableList.d.ts +57 -0
- package/dist/components/ConnectionList.d.ts +44 -0
- package/dist/components/ListItem.d.ts +16 -6
- package/dist/components/ReliabilityChart.d.ts +10 -0
- package/dist/components/ReliabilityList.d.ts +47 -0
- package/dist/connection-app-meta.d.ts +32 -0
- package/dist/flow.cjs +1 -1
- package/dist/flow.cjs.map +1 -1
- package/dist/flow.d.ts +3 -1
- package/dist/flow.mjs +50 -49
- package/dist/flow.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.mjs +1701 -891
- package/dist/index.mjs.map +1 -1
- package/dist/provider.d.ts +21 -1
- package/dist/reliability-board-layout.d.ts +121 -0
- package/dist/types.d.ts +8 -0
- package/package.json +3 -2
- package/src/code.css +23 -4
- package/src/styles/_callable-list.scss +60 -0
- package/src/styles/_connections.scss +100 -0
- package/src/styles/_flow.scss +4 -4
- package/src/styles/_lists.scss +4 -0
- package/src/styles/_reliability.scss +339 -0
- package/src/styles/_tokens.scss +23 -4
- package/src/styles.css +4386 -3108
- package/src/styles.scss +3 -0
- package/dist/ConfirmModal-DJPYXE9t.cjs +0 -11
- package/dist/ConfirmModal-DJPYXE9t.cjs.map +0 -1
- package/dist/ConfirmModal-sY1tzkBO.js.map +0 -1
- package/dist/ui.css +0 -1
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/* --- ReliabilityList / ReliabilityChart ---------------------------------- */
|
|
2
|
+
/* The service-reliability board: "needs attention" cards, a calls x p95
|
|
3
|
+
scatter and the services table. State colour throughout comes from the
|
|
4
|
+
shared `--w6w-health-*` tokens via HealthStatusPill and UptimeStrip (and,
|
|
5
|
+
for the scatter, read directly) — never from a colour written here.
|
|
6
|
+
Every navigation site (card, service cell, scatter point) may be an `<a>`,
|
|
7
|
+
a `<button>` or a plain element, so the shared rules reset all three. */
|
|
8
|
+
|
|
9
|
+
.w6w-rel-section {
|
|
10
|
+
margin-bottom: var(--w6w-sp-6);
|
|
11
|
+
}
|
|
12
|
+
.w6w-rel-heading {
|
|
13
|
+
margin: 0 0 var(--w6w-sp-2);
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: baseline;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: var(--w6w-sp-3);
|
|
18
|
+
}
|
|
19
|
+
.w6w-rel-intro {
|
|
20
|
+
margin: 0 0 var(--w6w-sp-2);
|
|
21
|
+
}
|
|
22
|
+
.w6w-rel-card {
|
|
23
|
+
background: var(--w6w-panel);
|
|
24
|
+
border: 1px solid var(--w6w-border);
|
|
25
|
+
border-radius: var(--w6w-radius);
|
|
26
|
+
padding: var(--w6w-sp-4);
|
|
27
|
+
}
|
|
28
|
+
.w6w-rel-card h4 {
|
|
29
|
+
margin: 0 0 var(--w6w-sp-2);
|
|
30
|
+
}
|
|
31
|
+
.w6w-rel-tag {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
background: var(--w6w-panel-2);
|
|
34
|
+
border: 1px solid var(--w6w-border);
|
|
35
|
+
border-radius: 999px;
|
|
36
|
+
padding: var(--w6w-sp-0-5) var(--w6w-sp-2);
|
|
37
|
+
font-size: var(--w6w-fs-xs);
|
|
38
|
+
color: var(--w6w-muted);
|
|
39
|
+
margin-right: var(--w6w-sp-1);
|
|
40
|
+
}
|
|
41
|
+
.w6w-rel-group + .w6w-rel-group {
|
|
42
|
+
margin-top: var(--w6w-sp-5);
|
|
43
|
+
}
|
|
44
|
+
.w6w-rel-group-head {
|
|
45
|
+
margin: 0 0 var(--w6w-sp-2);
|
|
46
|
+
font-size: var(--w6w-fs-sm);
|
|
47
|
+
}
|
|
48
|
+
/* The "N more — view all" line under a capped section. */
|
|
49
|
+
.w6w-rel-more-note {
|
|
50
|
+
margin: var(--w6w-sp-2) 0 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* --- "Needs attention" callout — a few dense cards, not table rows -------- */
|
|
54
|
+
.w6w-rel-issues {
|
|
55
|
+
display: grid;
|
|
56
|
+
/* `auto-fit`, not `auto-fill`: with fewer cards than fit the row, `auto-fill`
|
|
57
|
+
keeps empty width-reserving tracks and the cards stop short of the edge. */
|
|
58
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
59
|
+
gap: var(--w6w-sp-2);
|
|
60
|
+
}
|
|
61
|
+
.w6w-rel-issue-card {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: var(--w6w-sp-2);
|
|
65
|
+
padding: var(--w6w-sp-3);
|
|
66
|
+
background: var(--w6w-panel);
|
|
67
|
+
border: 1px solid var(--w6w-border);
|
|
68
|
+
/* Same `--w6w-health-*` tokens as the pills inside, so the stripe cannot
|
|
69
|
+
drift from the pill beside it. `down` on either signal escalates it. */
|
|
70
|
+
border-left: 3px solid var(--w6w-health-degraded);
|
|
71
|
+
border-radius: var(--w6w-radius);
|
|
72
|
+
color: inherit;
|
|
73
|
+
text-decoration: none;
|
|
74
|
+
/* button reset (the card is a <button> when only `onOpen` is given) */
|
|
75
|
+
font: inherit;
|
|
76
|
+
text-align: left;
|
|
77
|
+
width: 100%;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
div.w6w-rel-issue-card {
|
|
81
|
+
cursor: default;
|
|
82
|
+
}
|
|
83
|
+
.w6w-rel-issue-card:has(.w6w-health-pill-down) {
|
|
84
|
+
border-left-color: var(--w6w-health-down);
|
|
85
|
+
}
|
|
86
|
+
a.w6w-rel-issue-card:hover,
|
|
87
|
+
a.w6w-rel-issue-card:focus-visible,
|
|
88
|
+
button.w6w-rel-issue-card:hover,
|
|
89
|
+
button.w6w-rel-issue-card:focus-visible {
|
|
90
|
+
border-color: var(--w6w-accent);
|
|
91
|
+
}
|
|
92
|
+
.w6w-rel-issue-head {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: var(--w6w-sp-2);
|
|
96
|
+
}
|
|
97
|
+
.w6w-rel-issue-head-text {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
gap: var(--w6w-sp-0-5);
|
|
101
|
+
min-width: 0;
|
|
102
|
+
}
|
|
103
|
+
.w6w-rel-issue-signals {
|
|
104
|
+
display: flex;
|
|
105
|
+
gap: var(--w6w-sp-4);
|
|
106
|
+
}
|
|
107
|
+
.w6w-rel-issue-signal {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
gap: var(--w6w-sp-0-5);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* --- Performance scatter — calls x p95, one point per API ----------------- */
|
|
114
|
+
.w6w-rel-scatter svg {
|
|
115
|
+
display: block;
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: auto;
|
|
118
|
+
}
|
|
119
|
+
/* SVG shapes have no fill unless one is set here; without it the plot
|
|
120
|
+
renders as SVG's default opaque black regardless of theme. */
|
|
121
|
+
.w6w-rel-scatter-plot-bg {
|
|
122
|
+
fill: var(--w6w-panel-2);
|
|
123
|
+
}
|
|
124
|
+
.w6w-rel-scatter-grid {
|
|
125
|
+
stroke: var(--w6w-border);
|
|
126
|
+
stroke-width: 1;
|
|
127
|
+
}
|
|
128
|
+
.w6w-rel-scatter-axis-label {
|
|
129
|
+
fill: var(--w6w-muted);
|
|
130
|
+
font-size: var(--w6w-fs-xs);
|
|
131
|
+
}
|
|
132
|
+
.w6w-rel-scatter-axis-title {
|
|
133
|
+
fill: var(--w6w-muted);
|
|
134
|
+
font-size: var(--w6w-fs-xs);
|
|
135
|
+
}
|
|
136
|
+
/* The point's coloured ring — carries exec status. */
|
|
137
|
+
.w6w-rel-scatter-ring {
|
|
138
|
+
fill: var(--w6w-panel);
|
|
139
|
+
stroke-width: 2;
|
|
140
|
+
}
|
|
141
|
+
.w6w-rel-scatter-ring-ok {
|
|
142
|
+
stroke: var(--w6w-health-ok);
|
|
143
|
+
}
|
|
144
|
+
.w6w-rel-scatter-ring-degraded {
|
|
145
|
+
stroke: var(--w6w-health-degraded);
|
|
146
|
+
}
|
|
147
|
+
.w6w-rel-scatter-ring-down {
|
|
148
|
+
stroke: var(--w6w-health-down);
|
|
149
|
+
}
|
|
150
|
+
.w6w-rel-scatter-ring-unknown {
|
|
151
|
+
stroke: var(--w6w-health-unknown);
|
|
152
|
+
}
|
|
153
|
+
.w6w-rel-scatter-point-link {
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
.w6w-rel-scatter-point-link:hover .w6w-rel-scatter-ring,
|
|
157
|
+
.w6w-rel-scatter-point-link:focus-visible .w6w-rel-scatter-ring {
|
|
158
|
+
stroke-width: 3;
|
|
159
|
+
}
|
|
160
|
+
.w6w-rel-scatter-point {
|
|
161
|
+
stroke: var(--w6w-panel);
|
|
162
|
+
stroke-width: 1.5;
|
|
163
|
+
fill-opacity: 0.85;
|
|
164
|
+
}
|
|
165
|
+
.w6w-rel-scatter-point-ok {
|
|
166
|
+
fill: var(--w6w-health-ok);
|
|
167
|
+
}
|
|
168
|
+
.w6w-rel-scatter-point-degraded {
|
|
169
|
+
fill: var(--w6w-health-degraded);
|
|
170
|
+
}
|
|
171
|
+
.w6w-rel-scatter-point-down {
|
|
172
|
+
fill: var(--w6w-health-down);
|
|
173
|
+
}
|
|
174
|
+
.w6w-rel-scatter-point-unknown {
|
|
175
|
+
fill: var(--w6w-health-unknown);
|
|
176
|
+
}
|
|
177
|
+
.w6w-rel-scatter-note {
|
|
178
|
+
margin: var(--w6w-sp-1) 0 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* --- The full roster — one real <table> ------------------------------------ */
|
|
182
|
+
.w6w-rel-table-wrap {
|
|
183
|
+
overflow-x: auto;
|
|
184
|
+
}
|
|
185
|
+
.w6w-rel-table {
|
|
186
|
+
width: 100%;
|
|
187
|
+
border-collapse: collapse;
|
|
188
|
+
}
|
|
189
|
+
.w6w-rel-table th {
|
|
190
|
+
padding: var(--w6w-sp-2) var(--w6w-sp-3);
|
|
191
|
+
text-align: left;
|
|
192
|
+
font-size: var(--w6w-fs-xs);
|
|
193
|
+
font-weight: var(--w6w-fw-semibold);
|
|
194
|
+
color: var(--w6w-muted);
|
|
195
|
+
border-bottom: 1px solid var(--w6w-border);
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
}
|
|
198
|
+
.w6w-rel-table td {
|
|
199
|
+
padding: var(--w6w-sp-2-5) var(--w6w-sp-3);
|
|
200
|
+
border-bottom: 1px solid var(--w6w-border);
|
|
201
|
+
vertical-align: top;
|
|
202
|
+
}
|
|
203
|
+
/* Inside a compact card there is no rule under the last row. */
|
|
204
|
+
.w6w-rel-card .w6w-rel-table tbody tr:last-child td {
|
|
205
|
+
border-bottom: none;
|
|
206
|
+
}
|
|
207
|
+
.w6w-rel-table tbody tr:hover {
|
|
208
|
+
background: var(--w6w-panel-2);
|
|
209
|
+
}
|
|
210
|
+
/* A row's own stripe — same tokens and escalation as the issue card; both the
|
|
211
|
+
tier and the state that select the token are decided server-side. */
|
|
212
|
+
.w6w-rel-tr.w6w-rel-attention {
|
|
213
|
+
box-shadow: inset 3px 0 0 var(--w6w-health-degraded);
|
|
214
|
+
}
|
|
215
|
+
.w6w-rel-tr.w6w-rel-attention:has(.w6w-health-pill-down) {
|
|
216
|
+
box-shadow: inset 3px 0 0 var(--w6w-health-down);
|
|
217
|
+
}
|
|
218
|
+
.w6w-rel-tr[data-attention="recent"] {
|
|
219
|
+
box-shadow: inset 3px 0 0 var(--w6w-health-unknown);
|
|
220
|
+
}
|
|
221
|
+
.w6w-rel-open {
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: var(--w6w-sp-2);
|
|
225
|
+
color: inherit;
|
|
226
|
+
text-decoration: none;
|
|
227
|
+
/* button reset (the cell is a <button> when only `onOpen` is given) */
|
|
228
|
+
font: inherit;
|
|
229
|
+
text-align: left;
|
|
230
|
+
background: none;
|
|
231
|
+
border: 0;
|
|
232
|
+
padding: 0;
|
|
233
|
+
}
|
|
234
|
+
a.w6w-rel-open,
|
|
235
|
+
button.w6w-rel-open {
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
}
|
|
238
|
+
.w6w-rel-td-service-text {
|
|
239
|
+
display: flex;
|
|
240
|
+
flex-direction: column;
|
|
241
|
+
gap: var(--w6w-sp-0-5);
|
|
242
|
+
min-width: 0;
|
|
243
|
+
}
|
|
244
|
+
.w6w-rel-td-service strong {
|
|
245
|
+
overflow-wrap: anywhere;
|
|
246
|
+
}
|
|
247
|
+
a.w6w-rel-open:hover strong,
|
|
248
|
+
a.w6w-rel-open:focus-visible strong,
|
|
249
|
+
button.w6w-rel-open:hover strong,
|
|
250
|
+
button.w6w-rel-open:focus-visible strong {
|
|
251
|
+
color: var(--w6w-accent);
|
|
252
|
+
}
|
|
253
|
+
.w6w-rel-td-uptime {
|
|
254
|
+
min-width: 220px;
|
|
255
|
+
}
|
|
256
|
+
.w6w-rel-td-uptime .w6w-uptime-strip {
|
|
257
|
+
max-width: 260px;
|
|
258
|
+
}
|
|
259
|
+
/* A single short value ("397 ms" / "—"); no caption, whose varying length
|
|
260
|
+
destabilised this column's `auto` layout. */
|
|
261
|
+
.w6w-rel-td-p95 {
|
|
262
|
+
white-space: nowrap;
|
|
263
|
+
}
|
|
264
|
+
/* Both signals stacked as one line each ("Ops: <pill>" / "API: <pill>") rather
|
|
265
|
+
than two columns, so the table fits a smaller screen without scrolling. */
|
|
266
|
+
.w6w-rel-td-status {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
gap: var(--w6w-sp-1);
|
|
270
|
+
min-width: 140px;
|
|
271
|
+
}
|
|
272
|
+
.w6w-rel-status-row {
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
flex-wrap: wrap;
|
|
276
|
+
gap: var(--w6w-sp-1-5);
|
|
277
|
+
}
|
|
278
|
+
.w6w-rel-status-label {
|
|
279
|
+
min-width: 28px;
|
|
280
|
+
}
|
|
281
|
+
/* Within a status ROW the signal reads inline, beside its label — the issue
|
|
282
|
+
card's own use of `.w6w-rel-signal` (label above pill) is unaffected. */
|
|
283
|
+
.w6w-rel-status-row .w6w-rel-signal {
|
|
284
|
+
flex-direction: row;
|
|
285
|
+
align-items: center;
|
|
286
|
+
flex-wrap: wrap;
|
|
287
|
+
}
|
|
288
|
+
/* One labelled signal inside a state cell/card — label ABOVE its pill, so two
|
|
289
|
+
labelled pills in a narrow column do not wrap unpredictably. */
|
|
290
|
+
.w6w-rel-signal {
|
|
291
|
+
display: flex;
|
|
292
|
+
flex-direction: column;
|
|
293
|
+
align-items: flex-start;
|
|
294
|
+
gap: var(--w6w-sp-0-5);
|
|
295
|
+
min-width: 0;
|
|
296
|
+
}
|
|
297
|
+
.w6w-rel-vendor-msg {
|
|
298
|
+
color: var(--w6w-muted);
|
|
299
|
+
/* The API's own incident title — clamped, full text in the row's `title`, so
|
|
300
|
+
one verbose status page cannot stretch a board row. */
|
|
301
|
+
display: -webkit-box;
|
|
302
|
+
-webkit-line-clamp: 2;
|
|
303
|
+
-webkit-box-orient: vertical;
|
|
304
|
+
overflow: hidden;
|
|
305
|
+
overflow-wrap: anywhere;
|
|
306
|
+
}
|
|
307
|
+
/* A service the account never called: no strip, just a note. */
|
|
308
|
+
.w6w-rel-idle-note {
|
|
309
|
+
font-size: var(--w6w-fs-xs);
|
|
310
|
+
font-style: italic;
|
|
311
|
+
color: var(--w6w-text);
|
|
312
|
+
}
|
|
313
|
+
.w6w-rel-allclear {
|
|
314
|
+
margin-bottom: var(--w6w-sp-4);
|
|
315
|
+
}
|
|
316
|
+
.w6w-rel-allclear p {
|
|
317
|
+
margin: 0 0 var(--w6w-sp-1-5);
|
|
318
|
+
}
|
|
319
|
+
@media (max-width: 900px) {
|
|
320
|
+
/* The table scrolls inside `.w6w-rel-table-wrap` rather than reflowing —
|
|
321
|
+
4 columns of pills and a strip cannot usefully stack. */
|
|
322
|
+
.w6w-rel-table {
|
|
323
|
+
min-width: 600px;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* "Show all services →" when only `onShowAll` is given: a <button> that reads as the link. */
|
|
328
|
+
.w6w-rel-show-all {
|
|
329
|
+
font: inherit;
|
|
330
|
+
background: none;
|
|
331
|
+
border: 0;
|
|
332
|
+
padding: 0;
|
|
333
|
+
color: inherit;
|
|
334
|
+
cursor: pointer;
|
|
335
|
+
}
|
|
336
|
+
.w6w-rel-show-all:hover,
|
|
337
|
+
.w6w-rel-show-all:focus-visible {
|
|
338
|
+
color: var(--w6w-accent);
|
|
339
|
+
}
|
package/src/styles/_tokens.scss
CHANGED
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
|
|
29
29
|
/* Light — the base defaults. */
|
|
30
30
|
:where(:root) {
|
|
31
|
-
color-scheme: light;
|
|
32
31
|
--w6w-bg: #f7f8fa;
|
|
33
32
|
--w6w-panel: #ffffff;
|
|
34
33
|
--w6w-panel-2: #f0f2f6;
|
|
@@ -51,13 +50,13 @@
|
|
|
51
50
|
--w6w-code-punctuation: #5f6875;
|
|
52
51
|
--w6w-code-variable: #953800;
|
|
53
52
|
--w6w-radius: 10px;
|
|
53
|
+
--w6w-scheme: light;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/* Dark — followed automatically from the OS preference (unless a host has
|
|
57
57
|
forced a mode via data-theme, which is handled by the blocks below). */
|
|
58
58
|
@media (prefers-color-scheme: dark) {
|
|
59
59
|
:where(:root) {
|
|
60
|
-
color-scheme: dark;
|
|
61
60
|
--w6w-bg: #0f1115;
|
|
62
61
|
--w6w-panel: #181b22;
|
|
63
62
|
--w6w-panel-2: #1f232c;
|
|
@@ -72,6 +71,7 @@
|
|
|
72
71
|
--w6w-health-down: var(--w6w-danger);
|
|
73
72
|
--w6w-health-unknown: #9aa3b2;
|
|
74
73
|
--w6w-icon-swatch: #1f232c;
|
|
74
|
+
--w6w-scheme: dark;
|
|
75
75
|
--w6w-code-comment: #7d8797;
|
|
76
76
|
--w6w-code-keyword: #d2a8ff;
|
|
77
77
|
--w6w-code-string: #7ee787;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
/* Explicit mode. Declared AFTER the media query at equal (zero) specificity, so
|
|
86
86
|
a forced data-theme always beats the OS preference. */
|
|
87
87
|
:where([data-theme="light"]) {
|
|
88
|
-
|
|
88
|
+
--w6w-scheme: light;
|
|
89
89
|
--w6w-bg: #f7f8fa;
|
|
90
90
|
--w6w-panel: #ffffff;
|
|
91
91
|
--w6w-panel-2: #f0f2f6;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
--w6w-code-variable: #953800;
|
|
110
110
|
}
|
|
111
111
|
:where([data-theme="dark"]) {
|
|
112
|
-
|
|
112
|
+
--w6w-scheme: dark;
|
|
113
113
|
--w6w-bg: #0f1115;
|
|
114
114
|
--w6w-panel: #181b22;
|
|
115
115
|
--w6w-panel-2: #1f232c;
|
|
@@ -139,3 +139,22 @@
|
|
|
139
139
|
.w6w-small {
|
|
140
140
|
font-size: 0.85em;
|
|
141
141
|
}
|
|
142
|
+
|
|
143
|
+
/* color-scheme — declared on ui COMPONENT ROOTS, never on the host's <html>.
|
|
144
|
+
`color-scheme` inherits and also themes the page canvas, scrollbars and form
|
|
145
|
+
controls, so setting it on :root / [data-theme] let importing this file flip a
|
|
146
|
+
host's whole document. Instead each token block above also sets the
|
|
147
|
+
`--w6w-scheme` custom property (light / dark), which INHERITS, so the nearest
|
|
148
|
+
themed ancestor wins however themes nest (a light panel inside a dark page and
|
|
149
|
+
the reverse). Elements ui renders (any `w6w-` class, which covers the native
|
|
150
|
+
<dialog> modals) and the native controls inside them read it with
|
|
151
|
+
`color-scheme: var(--w6w-scheme)`. Not a hand-picked root list: every ui
|
|
152
|
+
component carries a `w6w-` class. Only an element whose class LIST has a token
|
|
153
|
+
starting `w6w-` matches (`class^=` / `class*=" w6w-"`), so host elements are never
|
|
154
|
+
touched: not a host `data-theme` wrapper, not a host class that merely contains
|
|
155
|
+
`w6w-` (`my-w6w-card`), and not a host element's own color-scheme on inputs nested
|
|
156
|
+
in a ui root (color-scheme inherits, so no descendant rule is needed). Nothing here
|
|
157
|
+
ever matches <html>/:root. All zero specificity. */
|
|
158
|
+
:where([class^="w6w-"]:not(:root), [class*=" w6w-"]:not(:root)) {
|
|
159
|
+
color-scheme: var(--w6w-scheme);
|
|
160
|
+
}
|