|
51 | 51 | );
|
52 | 52 | --button-secondary-hover-fg-color: var(--button-secondary-fg-color);
|
53 | 53 | --button-secondary-hover-border-color: var(--button-secondary-hover-bg-color);
|
| 54 | + --button-secondary-disabled-bg-color: var(--button-secondary-bg-color); |
| 55 | + --button-secondary-disabled-border-color: var( |
| 56 | + --button-secondary-border-color |
| 57 | + ); |
| 58 | + --button-secondary-disabled-fg-color: var(--button-secondary-fg-color); |
54 | 59 |
|
55 | 60 | --button-primary-bg-color: light-dark(#0060df, #0df);
|
56 | 61 | --button-primary-fg-color: light-dark(#fbfbfe, #15141a);
|
|
61 | 66 | --button-primary-hover-bg-color: light-dark(#0250bb, #80ebff);
|
62 | 67 | --button-primary-hover-fg-color: var(--button-primary-fg-color);
|
63 | 68 | --button-primary-hover-border-color: var(--button-primary-hover-bg-color);
|
64 |
| - |
65 |
| - --button-disabled-bg-color: color-mix(in srgb, currentcolor, transparent 60%); |
66 |
| - --button-disabled-fg-color: var(--button-disabled-bg-color); |
| 69 | + --button-primary-disabled-bg-color: var(--button-primary-bg-color); |
| 70 | + --button-primary-disabled-border-color: var(--button-primary-border-color); |
| 71 | + --button-primary-disabled-fg-color: var(--button-primary-fg-color); |
| 72 | + --button-disabled-opacity: 0.4; |
67 | 73 |
|
68 | 74 | --input-text-bg-color: light-dark(white, #42414d);
|
69 | 75 | --input-text-fg-color: var(--text-primary-color);
|
70 | 76 |
|
71 | 77 | @media (prefers-color-scheme: dark) {
|
72 | 78 | --hover-filter: brightness(1.4);
|
| 79 | + --button-disabled-opacity: 0.6; |
73 | 80 | }
|
74 | 81 |
|
75 | 82 | @media screen and (forced-colors: active) {
|
|
101 | 108 | --button-secondary-hover-bg-color: HighlightText;
|
102 | 109 | --button-secondary-hover-fg-color: SelectedItem;
|
103 | 110 | --button-secondary-hover-border-color: SelectedItem;
|
| 111 | + --button-secondary-disabled-fg-color: GrayText; |
| 112 | + --button-secondary-disabled-border-color: GrayText; |
104 | 113 |
|
105 | 114 | --button-primary-bg-color: ButtonText;
|
106 | 115 | --button-primary-fg-color: HighlightText;
|
|
111 | 120 | --button-primary-hover-bg-color: SelectedItem;
|
112 | 121 | --button-primary-hover-fg-color: HighlightText;
|
113 | 122 | --button-primary-hover-border-color: SelectedItem;
|
114 |
| - |
115 |
| - --button-disabled-bg-color: GrayText; |
116 |
| - --button-disabled-fg-color: ButtonFace; |
| 123 | + --button-primary-disabled-bg-color: GrayText; |
| 124 | + --button-primary-disabled-fg-color: ButtonFace; |
| 125 | + --button-primary-disabled-border-color: GrayText; |
| 126 | + --button-disabled-opacity: 1; |
117 | 127 |
|
118 | 128 | --input-text-bg-color: HighlightText;
|
119 | 129 | --input-text-fg-color: FieldText;
|
|
249 | 259 | background-color: var(--button-secondary-active-bg-color);
|
250 | 260 | border-color: var(--button-secondary-active-border-color);
|
251 | 261 | }
|
| 262 | + |
| 263 | + &:disabled { |
| 264 | + background-color: var(--button-secondary-disabled-bg-color); |
| 265 | + border-color: var(--button-secondary-disabled-border-color); |
| 266 | + color: var(--button-secondary-disabled-fg-color); |
| 267 | + opacity: var(--button-disabled-opacity); |
| 268 | + } |
252 | 269 | }
|
253 | 270 |
|
254 | 271 | &.primaryButton {
|
|
268 | 285 | background-color: var(--button-primary-active-bg-color);
|
269 | 286 | border-color: var(--button-primary-active-border-color);
|
270 | 287 | }
|
| 288 | + |
| 289 | + &:disabled { |
| 290 | + background-color: var(--button-primary-disabled-bg-color); |
| 291 | + border-color: var(--button-primary-disabled-border-color); |
| 292 | + color: var(--button-primary-disabled-fg-color); |
| 293 | + opacity: var(--button-disabled-opacity); |
| 294 | + } |
271 | 295 | }
|
272 | 296 |
|
273 | 297 | &:disabled {
|
274 |
| - color: var(--button-disabled-fg-color) !important; |
275 |
| - background-color: var(--button-disabled-bg-color); |
276 |
| - border-color: var(--button-disabled-bg-color); |
277 | 298 | pointer-events: none;
|
278 | 299 | }
|
279 | 300 | }
|
|
0 commit comments