Commit bf6c1f1
authored
Recolor primary-button icons from token via mask, not invert (#90)
* Recolor primary-button icons from token via mask, not invert
The .l-ui-button--primary .l-ui-icon rule used a binary invert filter,
which can only produce black or white. Accents with a non-white
foreground rendered the wrong icon colour and had to be patched out
downstream with filter: none.
Paint the icon from the existing --button-primary-icon token using a CSS
mask (the technique already used for the select dropdown arrow), with a
higher-specificity .dark override so the base dark:invert can't flip the
token colour. The panel hide button - the only such call site - now
emits the SVG as --l-ui-icon-src on a span instead of an img src.
The broadly-used .l-ui-icon img + dark:invert behaviour is unchanged.
* Quote url() in panel icon inline style for robustness1 parent 1d2310a commit bf6c1f1
3 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
584 | 587 | | |
585 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
586 | 598 | | |
587 | 599 | | |
588 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments