@axiapps/axi-design 1.30.0 → 1.31.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/axi.css +32 -0
- package/docs/RULES.md +24 -0
- package/package.json +1 -1
- package/src/primitives.css +32 -0
package/dist/axi.css
CHANGED
|
@@ -569,6 +569,27 @@ button.axi-panel--tile:hover,
|
|
|
569
569
|
color: var(--axi-meta);
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
+
/* A chip you press. A chip is a mark - it states a value about the thing it
|
|
573
|
+
sits on - and a mark has no cursor and does not move. But the same shape also
|
|
574
|
+
turns up holding a value the *reader* chose and can take back: the filters
|
|
575
|
+
standing above a table, one per selection, each one dismissable. That is
|
|
576
|
+
still a chip and not a button, because its label is data rather than an
|
|
577
|
+
action - "DAMAGE", not "Clear all" - and rule 5 is what tells the reader
|
|
578
|
+
which of the two they are looking at. What it is missing is only the press
|
|
579
|
+
affordances: the hand, and the block that every other pressable thing in the
|
|
580
|
+
language raises on hover.
|
|
581
|
+
|
|
582
|
+
It deliberately says nothing about colour. `.axi-chip--accent` and the three
|
|
583
|
+
status fills each set their own contrast pair at one class, and a hover
|
|
584
|
+
brighten here would weigh the same and win on source order - putting a
|
|
585
|
+
neutral back on top of a saturated fill. There is nothing for a brighten to
|
|
586
|
+
add to a filled chip anyway; the lift is the feedback. */
|
|
587
|
+
.axi-chip--action { cursor: pointer; }
|
|
588
|
+
.axi-chip--action:where(:hover) {
|
|
589
|
+
box-shadow: var(--axi-shadow-control);
|
|
590
|
+
transform: translate(-2px, -2px);
|
|
591
|
+
}
|
|
592
|
+
|
|
572
593
|
/* ---------- count badge ---------- */
|
|
573
594
|
.axi-badge-count {
|
|
574
595
|
display: inline-block;
|
|
@@ -578,6 +599,17 @@ button.axi-panel--tile:hover,
|
|
|
578
599
|
color: var(--axi-accent-ink);
|
|
579
600
|
font: var(--axi-t-micro);
|
|
580
601
|
}
|
|
602
|
+
/* The one placement where the badge's own fill is the fill it is sitting on.
|
|
603
|
+
.axi-btn--primary is the accent, and so is the badge, so the count went
|
|
604
|
+
invisible - not dim, gone. Inverted rather than given a third colour: the
|
|
605
|
+
same two values the other way round is the only pairing rule 5 leaves, since
|
|
606
|
+
a status hue here would say something about the count that is not true.
|
|
607
|
+
Found by a consumer, which had written this rule itself against its own
|
|
608
|
+
class name because the language had no answer. */
|
|
609
|
+
.axi-btn--primary .axi-badge-count {
|
|
610
|
+
background: var(--axi-accent-ink);
|
|
611
|
+
color: var(--axi-accent);
|
|
612
|
+
}
|
|
581
613
|
|
|
582
614
|
/* ---------- diamond ---------- */
|
|
583
615
|
/* The family motif: a rotated outlined square. Used as a bullet, a status dot
|
package/docs/RULES.md
CHANGED
|
@@ -211,6 +211,30 @@ A filled chip asserts a value about the thing. An outlined chip in the cool ink
|
|
|
211
211
|
is commentary *about* the thing — a maintainer's judgment, a source, a caveat.
|
|
212
212
|
A reader must be able to tell which they are looking at before reading either.
|
|
213
213
|
|
|
214
|
+
A chip may be a press. `.axi-chip--action` adds the hand and the block, and
|
|
215
|
+
nothing else — the label of a dismissable filter is still data ("DAMAGE"), not
|
|
216
|
+
an action ("Clear all"), so this rule is what tells a reader which of the two a
|
|
217
|
+
given box is, and a chip that becomes clickable must not stop looking like a
|
|
218
|
+
chip.
|
|
219
|
+
|
|
220
|
+
**Inside a fill, the only inks are that fill's own pair.** A filled chip, a
|
|
221
|
+
pressed pill, a primary button and a current tab each set a contrast ink against
|
|
222
|
+
a saturated ground, and anything nested inside them inherits that ground whether
|
|
223
|
+
it reads the pair or not. A neutral from the ramp there is not quieter, it is
|
|
224
|
+
gone: a consumer's dismiss glyph written `--axi-text-dim` measured **1.39:1**
|
|
225
|
+
against the accent fill beside a label at 12.24:1, and `.axi-badge-count` inside
|
|
226
|
+
`.axi-btn--primary` was the accent on the accent until 1.30.1. The fix in both
|
|
227
|
+
cases is to say nothing — `currentColor` is already the pair — and the trap is
|
|
228
|
+
that saying nothing looks like an omission while `--axi-text-dim` looks like a
|
|
229
|
+
decision.
|
|
230
|
+
|
|
231
|
+
This is checked by eye and not by a test, deliberately. The obvious static
|
|
232
|
+
check — no descendant rule inside a fillable component may set `color` to a
|
|
233
|
+
neutral — flags `.axi-tabs .axi-tabs__close`, which is correct: the tab's fill
|
|
234
|
+
sits on the anchor and the close control is its *sibling*, so the faint neutral
|
|
235
|
+
is against the page ground. Whether a nested element is on the fill is a fact
|
|
236
|
+
about the paint chain, and a stylesheet does not contain it.
|
|
237
|
+
|
|
214
238
|
The same rule governs coloured strips on cards: a strip must encode real data.
|
|
215
239
|
A strip that carries "category" is decoration impersonating data, and it takes
|
|
216
240
|
the first position the eye lands on.
|
package/package.json
CHANGED
package/src/primitives.css
CHANGED
|
@@ -295,6 +295,27 @@ button.axi-panel--tile:hover,
|
|
|
295
295
|
color: var(--axi-meta);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
+
/* A chip you press. A chip is a mark - it states a value about the thing it
|
|
299
|
+
sits on - and a mark has no cursor and does not move. But the same shape also
|
|
300
|
+
turns up holding a value the *reader* chose and can take back: the filters
|
|
301
|
+
standing above a table, one per selection, each one dismissable. That is
|
|
302
|
+
still a chip and not a button, because its label is data rather than an
|
|
303
|
+
action - "DAMAGE", not "Clear all" - and rule 5 is what tells the reader
|
|
304
|
+
which of the two they are looking at. What it is missing is only the press
|
|
305
|
+
affordances: the hand, and the block that every other pressable thing in the
|
|
306
|
+
language raises on hover.
|
|
307
|
+
|
|
308
|
+
It deliberately says nothing about colour. `.axi-chip--accent` and the three
|
|
309
|
+
status fills each set their own contrast pair at one class, and a hover
|
|
310
|
+
brighten here would weigh the same and win on source order - putting a
|
|
311
|
+
neutral back on top of a saturated fill. There is nothing for a brighten to
|
|
312
|
+
add to a filled chip anyway; the lift is the feedback. */
|
|
313
|
+
.axi-chip--action { cursor: pointer; }
|
|
314
|
+
.axi-chip--action:where(:hover) {
|
|
315
|
+
box-shadow: var(--axi-shadow-control);
|
|
316
|
+
transform: translate(-2px, -2px);
|
|
317
|
+
}
|
|
318
|
+
|
|
298
319
|
/* ---------- count badge ---------- */
|
|
299
320
|
.axi-badge-count {
|
|
300
321
|
display: inline-block;
|
|
@@ -304,6 +325,17 @@ button.axi-panel--tile:hover,
|
|
|
304
325
|
color: var(--axi-accent-ink);
|
|
305
326
|
font: var(--axi-t-micro);
|
|
306
327
|
}
|
|
328
|
+
/* The one placement where the badge's own fill is the fill it is sitting on.
|
|
329
|
+
.axi-btn--primary is the accent, and so is the badge, so the count went
|
|
330
|
+
invisible - not dim, gone. Inverted rather than given a third colour: the
|
|
331
|
+
same two values the other way round is the only pairing rule 5 leaves, since
|
|
332
|
+
a status hue here would say something about the count that is not true.
|
|
333
|
+
Found by a consumer, which had written this rule itself against its own
|
|
334
|
+
class name because the language had no answer. */
|
|
335
|
+
.axi-btn--primary .axi-badge-count {
|
|
336
|
+
background: var(--axi-accent-ink);
|
|
337
|
+
color: var(--axi-accent);
|
|
338
|
+
}
|
|
307
339
|
|
|
308
340
|
/* ---------- diamond ---------- */
|
|
309
341
|
/* The family motif: a rotated outlined square. Used as a bullet, a status dot
|