|
11 | 11 | * governing permissions and limitations under the License.
|
12 | 12 | */
|
13 | 13 |
|
14 |
| -@media (forced-colors: active) { |
15 |
| - .spectrum-ActionButton { |
16 |
| - /* force a more visible focus indicator color */ |
17 |
| - --highcontrast-actionbutton-focus-indicator-color: ButtonText; |
18 |
| - |
19 |
| - &::after { |
20 |
| - /* make sure focus indicator renders */ |
21 |
| - forced-color-adjust: none; |
22 |
| - } |
23 |
| - |
24 |
| - &.is-selected { |
25 |
| - --highcontrast-actionbutton-background-color-default: Highlight; |
26 |
| - --highcontrast-actionbutton-background-color-hover: Highlight; |
27 |
| - --highcontrast-actionbutton-background-color-focus: Highlight; |
28 |
| - --highcontrast-actionbutton-background-color-down: Highlight; |
29 |
| - --highcontrast-actionbutton-background-color-disabled: ButtonFace; |
30 |
| - |
31 |
| - --highcontrast-actionbutton-border-color-default: HighlightText; |
32 |
| - --highcontrast-actionbutton-border-color-hover: HighlightText; |
33 |
| - --highcontrast-actionbutton-border-color-focus: HighlightText; |
34 |
| - --highcontrast-actionbutton-border-color-down: HighlightText; |
35 |
| - --highcontrast-actionbutton-border-color-disabled: GrayText; |
36 |
| - |
37 |
| - --highcontrast-actionbutton-content-color-default: HighlightText; |
38 |
| - --highcontrast-actionbutton-content-color-hover: HighlightText; |
39 |
| - --highcontrast-actionbutton-content-color-focus: HighlightText; |
40 |
| - --highcontrast-actionbutton-content-color-down: HighlightText; |
41 |
| - --highcontrast-actionbutton-content-color-disabled: GrayText; |
42 |
| - |
43 |
| - .spectrum-ActionButton-icon, |
44 |
| - .spectrum-ActionButton-hold, |
45 |
| - .spectrum-ActionButton-label { |
46 |
| - /* ensure custom text colors from above get applied */ |
47 |
| - /* it seems like this shouldn't have to be done, but colors are wrong without it */ |
48 |
| - forced-color-adjust: none; |
49 |
| - } |
50 |
| - } |
51 |
| - } |
52 |
| -} |
53 |
| - |
54 | 14 | .spectrum-ActionButton {
|
55 | 15 | --spectrum-actionbutton-background-color-default: var(--highcontrast-actionbutton-background-color-default, var(--mod-actionbutton-background-color-default, var(--spectrum-gray-50)));
|
56 | 16 | --spectrum-actionbutton-background-color-hover: var(--highcontrast-actionbutton-background-color-hover, var(--mod-actionbutton-background-color-hover, var(--spectrum-gray-100)));
|
57 | 17 | --spectrum-actionbutton-background-color-down: var(--highcontrast-actionbutton-background-color-down, var(--mod-actionbutton-background-color-down, var(--spectrum-gray-200)));
|
58 | 18 | --spectrum-actionbutton-background-color-focus: var(--highcontrast-actionbutton-background-color-focus, var(--mod-actionbutton-background-color-focus, var(--spectrum-gray-100)));
|
59 |
| - --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-transparent-black-100); |
60 |
| - |
61 |
| - --spectrum-actionbutton-background-color-selected: var(--spectrum-neutral-background-color-selected-default); |
62 |
| - --spectrum-actionbutton-background-color-selected-hover: var(--spectrum-neutral-background-color-selected-hover); |
63 |
| - --spectrum-actionbutton-background-color-selected-down: var(--spectrum-neutral-background-color-selected-down); |
64 |
| - --spectrum-actionbutton-background-color-selected-focus: var(--spectrum-neutral-background-color-selected-key-focus); |
65 | 19 |
|
66 | 20 | --spectrum-actionbutton-border-color-default: var(--highcontrast-actionbutton-border-color-default, var(--mod-actionbutton-border-color-default, var(--spectrum-gray-400)));
|
67 | 21 | --spectrum-actionbutton-border-color-hover: var(--highcontrast-actionbutton-border-color-hover, var(--mod-actionbutton-border-color-hover, var(--spectrum-gray-500)));
|
68 | 22 | --spectrum-actionbutton-border-color-down: var(--highcontrast-actionbutton-border-color-down, var(--mod-actionbutton-border-color-down, var(--spectrum-gray-600)));
|
69 | 23 | --spectrum-actionbutton-border-color-focus: var(--highcontrast-actionbutton-border-color-focus, var(--mod-actionbutton-border-color-focus, var(--spectrum-gray-500)));
|
70 | 24 | --spectrum-actionbutton-border-color-disabled: var(--spectrum-disabled-border-color);
|
71 |
| - |
72 |
| - --spectrum-actionbutton-content-color-selected: var(--spectrum-gray-50); |
| 25 | + --spectrum-actionbutton-content-color-disabled: var(--spectrum-disabled-content-color); |
73 | 26 |
|
74 | 27 | --spectrum-actionbutton-animation-duration: var(--mod-actionbutton-animation-duration, var(--spectrum-animation-duration-100));
|
75 | 28 | --spectrum-actionbutton-border-radius: var(--mod-actionbutton-border-radius, var(--spectrum-corner-radius-medium-size-medium));
|
|
114 | 67 | --mod-actionbutton-border-color-focus: var(--spectrum-transparent-black-600);
|
115 | 68 |
|
116 | 69 | --spectrum-actionbutton-background-color-disabled: transparent;
|
117 |
| - --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-transparent-black-200); |
118 | 70 |
|
119 | 71 | &,
|
120 | 72 | &.spectrum-ActionButton--quiet {
|
|
132 | 84 | --mod-actionbutton-border-color-focus: var(--spectrum-transparent-white-600);
|
133 | 85 |
|
134 | 86 | --spectrum-actionbutton-background-color-disabled: transparent;
|
135 |
| - --spectrum-actionbutton-background-color-selected-disabled: var(--spectrum-transparent-white-200); |
136 | 87 |
|
137 | 88 | &,
|
138 | 89 | &.spectrum-ActionButton--quiet {
|
@@ -410,3 +361,43 @@ a.spectrum-ActionButton {
|
410 | 361 | /* Augment the margin correction for the icon only scenario */
|
411 | 362 | margin-inline-start: calc(var(--spectrum-actionbutton-edge-to-visual-only) - var(--spectrum-actionbutton-edge-to-text));
|
412 | 363 | }
|
| 364 | + |
| 365 | +@media (forced-colors: active) { |
| 366 | + .spectrum-ActionButton { |
| 367 | + /* force a more visible focus indicator color */ |
| 368 | + --highcontrast-actionbutton-focus-indicator-color: ButtonText; |
| 369 | + |
| 370 | + &::after { |
| 371 | + /* make sure focus indicator renders */ |
| 372 | + forced-color-adjust: none; |
| 373 | + } |
| 374 | + |
| 375 | + &.is-selected { |
| 376 | + --highcontrast-actionbutton-background-color-default: Highlight; |
| 377 | + --highcontrast-actionbutton-background-color-hover: Highlight; |
| 378 | + --highcontrast-actionbutton-background-color-focus: Highlight; |
| 379 | + --highcontrast-actionbutton-background-color-down: Highlight; |
| 380 | + --highcontrast-actionbutton-background-color-disabled: ButtonFace; |
| 381 | + |
| 382 | + --highcontrast-actionbutton-border-color-default: HighlightText; |
| 383 | + --highcontrast-actionbutton-border-color-hover: HighlightText; |
| 384 | + --highcontrast-actionbutton-border-color-focus: HighlightText; |
| 385 | + --highcontrast-actionbutton-border-color-down: HighlightText; |
| 386 | + --highcontrast-actionbutton-border-color-disabled: GrayText; |
| 387 | + |
| 388 | + --highcontrast-actionbutton-content-color-default: HighlightText; |
| 389 | + --highcontrast-actionbutton-content-color-hover: HighlightText; |
| 390 | + --highcontrast-actionbutton-content-color-focus: HighlightText; |
| 391 | + --highcontrast-actionbutton-content-color-down: HighlightText; |
| 392 | + --highcontrast-actionbutton-content-color-disabled: GrayText; |
| 393 | + |
| 394 | + .spectrum-ActionButton-icon, |
| 395 | + .spectrum-ActionButton-hold, |
| 396 | + .spectrum-ActionButton-label { |
| 397 | + /* ensure custom text colors from above get applied */ |
| 398 | + /* it seems like this shouldn't have to be done, but colors are wrong without it */ |
| 399 | + forced-color-adjust: none; |
| 400 | + } |
| 401 | + } |
| 402 | + } |
| 403 | +} |
0 commit comments