|
| 1 | +@mixin svg-styles($color) { |
| 2 | + svg *[stroke^="#"] { |
| 3 | + stroke: $color; |
| 4 | + } |
| 5 | + |
| 6 | + svg *[fill^="#"] { |
| 7 | + fill: $color; |
| 8 | + } |
| 9 | +} |
| 10 | + |
1 | 11 | @mixin button-variant-styles($background, $text-color, $border-color) {
|
2 | 12 | background: $background;
|
3 | 13 | color: $text-color;
|
|
7 | 17 | color: $text-color;
|
8 | 18 | }
|
9 | 19 |
|
10 |
| - svg *[stroke^="#"] { |
11 |
| - stroke: $text-color; |
12 |
| - } |
13 |
| - |
14 |
| - svg *[fill^="#"] { |
15 |
| - fill: $text-color; |
16 |
| - } |
| 20 | + @include svg-styles($text-color); |
17 | 21 |
|
18 | 22 | // Custom state for loader
|
19 | 23 | // Added using css to ensure using the respective text-color
|
|
29 | 33 | }
|
30 | 34 | }
|
31 | 35 |
|
32 |
| -@mixin pseudo-states($hover-bg-color, $active-bg-color, $hover-border-color: null) { |
| 36 | +@mixin pseudo-states($hover-bg-color, $active-bg-color, $hover-border-color: null, $color: null) { |
33 | 37 | $parent-selector: &;
|
34 | 38 |
|
35 | 39 | &:hover:not([disabled]) {
|
|
38 | 42 | @if ($hover-border-color) {
|
39 | 43 | border-color: $hover-border-color;
|
40 | 44 | }
|
| 45 | + |
| 46 | + @if ($color) { |
| 47 | + color: $color; |
| 48 | + |
| 49 | + @include svg-styles($color); |
| 50 | + } |
41 | 51 | }
|
42 | 52 |
|
43 | 53 | &:active:not([disabled]) {
|
44 | 54 | background: $active-bg-color;
|
| 55 | + |
| 56 | + @if ($color) { |
| 57 | + color: $color; |
| 58 | + |
| 59 | + @include svg-styles($color); |
| 60 | + } |
45 | 61 | }
|
46 | 62 | }
|
47 | 63 |
|
|
67 | 83 | @include pseudo-states(var(--R600), var(--R700));
|
68 | 84 | }
|
69 | 85 |
|
| 86 | + &--negative-grey { |
| 87 | + @include button-variant-styles(var(--N600), $text-color, $border-color); |
| 88 | + @include pseudo-states(var(--R600), var(--R700), null, $text-color); |
| 89 | + } |
| 90 | + |
70 | 91 | &--positive {
|
71 | 92 | @include button-variant-styles(var(--G500), $text-color, $border-color);
|
72 | 93 | @include pseudo-states(var(--G600), var(--G700));
|
|
94 | 115 |
|
95 | 116 | &--negative {
|
96 | 117 | @include button-variant-styles($background, var(--R600), $border-color);
|
97 |
| - @include pseudo-states(var(--R100), var(--R200), var(--R600)); |
| 118 | + @include pseudo-states(var(--R100), var(--R200), var(--R600), var(--R600)); |
| 119 | + } |
| 120 | + |
| 121 | + &--negative-grey { |
| 122 | + @include button-variant-styles($background, var(--N700), $border-color); |
| 123 | + @include pseudo-states(var(--R100), var(--R200), var(--R600), var(--R600)); |
98 | 124 | }
|
99 | 125 |
|
100 | 126 | &--positive {
|
|
127 | 153 | @include button-variant-styles($background, var(--R600), $border-color);
|
128 | 154 | }
|
129 | 155 |
|
| 156 | + &--negative-grey { |
| 157 | + @include button-variant-styles($background, var(--N700), $border-color); |
| 158 | + } |
| 159 | + |
130 | 160 | &--positive {
|
131 | 161 | @include button-variant-styles($background, var(--G600), $border-color);
|
132 | 162 | }
|
|
150 | 180 | @include pseudo-states(var(--R100), var(--R200));
|
151 | 181 | }
|
152 | 182 |
|
| 183 | + &--negative-grey { |
| 184 | + @include pseudo-states(var(--R100), var(--R200), null, var(--R500)); |
| 185 | + } |
| 186 | + |
153 | 187 | &--positive {
|
154 | 188 | @include pseudo-states(var(--G100), var(--G200));
|
155 | 189 | }
|
|
168 | 202 |
|
169 | 203 | &--default,
|
170 | 204 | &--negative,
|
| 205 | + &--negative-grey, |
171 | 206 | &--positive,
|
172 | 207 | &--warning,
|
173 | 208 | &--neutral {
|
|
0 commit comments