|
32 | 32 |
|
33 | 33 | &:hover,
|
34 | 34 | &:focus {
|
35 |
| - .button-color( |
36 |
| - @color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) ` |
37 |
| - ); |
| 35 | + & when (@theme = dark) { |
| 36 | + .button-color( |
| 37 | + @color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) ` |
| 38 | + ); |
| 39 | + } |
| 40 | + & when not (@theme = dark) { |
| 41 | + .button-color( |
| 42 | + @color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) ` |
| 43 | + ); |
| 44 | + } |
38 | 45 | }
|
39 | 46 |
|
40 | 47 | &:active,
|
41 | 48 | &.active {
|
42 |
| - .button-color( |
43 |
| - @color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) ` |
44 |
| - ); |
| 49 | + & when (@theme = dark) { |
| 50 | + .button-color( |
| 51 | + @color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) ` |
| 52 | + ); |
| 53 | + } |
| 54 | + & when not (@theme = dark) { |
| 55 | + .button-color( |
| 56 | + @color; ~`colorPalette('@{background}', 7) `; ~`colorPalette('@{background}', 7) ` |
| 57 | + ); |
| 58 | + } |
45 | 59 | }
|
46 | 60 |
|
47 | 61 | .button-disabled();
|
|
52 | 66 |
|
53 | 67 | &:hover,
|
54 | 68 | &:focus {
|
55 |
| - .button-color( |
56 |
| - ~`colorPalette('@{btn-primary-bg}', 5) `; @background; ~`colorPalette('@{btn-primary-bg}', 5) |
57 |
| - ` |
58 |
| - ); |
| 69 | + & when (@theme = dark) { |
| 70 | + .button-color(@primary-5; @background; @primary-5); |
| 71 | + } |
| 72 | + & when not (@theme = dark) { |
| 73 | + .button-color( |
| 74 | + ~`colorPalette('@{btn-primary-bg}', 5) `; @background; |
| 75 | + ~`colorPalette('@{btn-primary-bg}', 5) ` |
| 76 | + ); |
| 77 | + } |
59 | 78 | }
|
60 | 79 | &:active,
|
61 | 80 | &.active {
|
62 |
| - .button-color( |
63 |
| - ~`colorPalette('@{btn-primary-bg}', 7) `; @background; ~`colorPalette('@{btn-primary-bg}', 7) |
64 |
| - ` |
65 |
| - ); |
| 81 | + & when (@theme = dark) { |
| 82 | + .button-color(@primary-7; @background; @primary-7); |
| 83 | + } |
| 84 | + & when not (@theme = dark) { |
| 85 | + .button-color( |
| 86 | + ~`colorPalette('@{btn-primary-bg}', 7) `; @background; |
| 87 | + ~`colorPalette('@{btn-primary-bg}', 7) ` |
| 88 | + ); |
| 89 | + } |
66 | 90 | }
|
67 | 91 | .button-disabled();
|
68 | 92 | }
|
|
72 | 96 | &:hover,
|
73 | 97 | &:focus {
|
74 | 98 | & when (@border = transparent) {
|
75 |
| - .button-color(~`colorPalette('@{color}', 5) `; transparent; transparent); |
| 99 | + & when (@theme = dark) { |
| 100 | + .button-color(~`colorPalette('@{color}', 7) `; transparent; transparent); |
| 101 | + } |
| 102 | + & when not (@theme = dark) { |
| 103 | + .button-color(~`colorPalette('@{color}', 5) `; transparent; transparent); |
| 104 | + } |
76 | 105 | }
|
77 | 106 | & when not(@border = transparent) {
|
78 |
| - .button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `); |
| 107 | + & when (@theme = dark) { |
| 108 | + .button-color( |
| 109 | + ~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) ` |
| 110 | + ); |
| 111 | + } |
| 112 | + & when not (@theme = dark) { |
| 113 | + .button-color( |
| 114 | + ~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) ` |
| 115 | + ); |
| 116 | + } |
79 | 117 | }
|
80 | 118 | }
|
81 | 119 | &:active,
|
82 | 120 | &.active {
|
83 | 121 | & when (@border = transparent) {
|
84 |
| - .button-color(~`colorPalette('@{color}', 7) `; transparent; transparent); |
| 122 | + & when (@theme = dark) { |
| 123 | + .button-color(~`colorPalette('@{color}', 5) `; transparent; transparent); |
| 124 | + } |
| 125 | + & when not (@theme = dark) { |
| 126 | + .button-color(~`colorPalette('@{color}', 7) `; transparent; transparent); |
| 127 | + } |
85 | 128 | }
|
86 | 129 | & when not(@border = transparent) {
|
87 |
| - .button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `); |
| 130 | + & when (@theme = dark) { |
| 131 | + .button-color( |
| 132 | + ~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) ` |
| 133 | + ); |
| 134 | + } |
| 135 | + & when not (@theme = dark) { |
| 136 | + .button-color( |
| 137 | + ~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) ` |
| 138 | + ); |
| 139 | + } |
88 | 140 | }
|
89 | 141 | }
|
90 | 142 | .button-disabled();
|
|
0 commit comments