|
16 | 16 |
|
17 | 17 | // The spec only provides guidance for light-themed chips. When inside of a dark theme, fall back |
18 | 18 | // to standard background and foreground colors. |
19 | | - $unselected-background: if($is-dark-theme, mat-color($background, card), #e0e0e0); |
| 19 | + $unselected-background: if($is-dark-theme, #656565, #e0e0e0); |
20 | 20 | $unselected-foreground: if($is-dark-theme, mat-color($foreground, text), $light-foreground); |
21 | 21 |
|
22 | 22 | $selected-background: if($is-dark-theme, mat-color($background, app-bar), #808080); |
23 | 23 | $selected-foreground: if($is-dark-theme, mat-color($foreground, text), $light-selected-foreground); |
24 | 24 |
|
| 25 | + $focus-color: mat-color($foreground, text); |
| 26 | + |
25 | 27 | .mat-chip:not(.mat-basic-chip) { |
26 | 28 | background-color: $unselected-background; |
27 | 29 | color: $unselected-foreground; |
| 30 | + |
| 31 | + .mat-chip-focus-border { |
| 32 | + pointer-events: none; |
| 33 | + } |
| 34 | + |
| 35 | + &:focus { |
| 36 | + outline: none; |
| 37 | + border: 2px solid $focus-color; |
| 38 | + } |
| 39 | + |
| 40 | + .mat-chip-remove { |
| 41 | + color: $unselected-foreground; |
| 42 | + opacity: 0.3; |
| 43 | + |
| 44 | + &:hover { |
| 45 | + opacity: 0.54; |
| 46 | + } |
| 47 | + } |
28 | 48 | } |
29 | 49 |
|
30 | 50 | .mat-chip.mat-chip-selected:not(.mat-basic-chip) { |
31 | 51 | background-color: $selected-background; |
32 | 52 | color: $selected-foreground; |
33 | 53 |
|
| 54 | + .mat-chip-remove { |
| 55 | + color: $selected-foreground; |
| 56 | + opacity: 0.4; |
| 57 | + |
| 58 | + &:hover { |
| 59 | + opacity: 0.54; |
| 60 | + } |
| 61 | + } |
| 62 | + |
34 | 63 | &.mat-primary { |
35 | 64 | background-color: mat-color($primary, 500); |
36 | 65 | color: mat-contrast($primary, 500); |
| 66 | + |
| 67 | + .mat-chip-remove { |
| 68 | + color: mat-contrast($primary, 500); |
| 69 | + opacity: 0.4; |
| 70 | + |
| 71 | + &:hover { |
| 72 | + opacity: 0.54; |
| 73 | + } |
| 74 | + } |
37 | 75 | } |
38 | 76 |
|
39 | 77 | &.mat-accent { |
40 | 78 | background-color: mat-color($accent, 500); |
41 | 79 | color: mat-contrast($accent, 500); |
| 80 | + |
| 81 | + .mat-chip-remove { |
| 82 | + color: mat-contrast($accent, 500); |
| 83 | + opacity: 0.4; |
| 84 | + |
| 85 | + &:hover { |
| 86 | + opacity: 0.54; |
| 87 | + } |
| 88 | + } |
42 | 89 | } |
43 | 90 |
|
44 | 91 | &.mat-warn { |
45 | 92 | background-color: mat-color($warn, 500); |
46 | 93 | color: mat-contrast($warn, 500); |
| 94 | + |
| 95 | + .mat-chip-remove { |
| 96 | + color: mat-contrast($warn, 500); |
| 97 | + opacity: 0.4; |
| 98 | + |
| 99 | + &:hover { |
| 100 | + opacity: 0.54; |
| 101 | + } |
| 102 | + } |
47 | 103 | } |
48 | 104 | } |
49 | 105 | } |
0 commit comments