|
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)));
|
|
103 | 63 | }
|
104 | 64 |
|
105 | 65 | &.spectrum-ActionButton--quiet {
|
| 66 | + --mod-actionbutton-border-color-default: transparent; |
| 67 | + |
106 | 68 | --mod-actionbutton-background-color-default: transparent;
|
107 | 69 | --mod-actionbutton-background-color-hover: var(--spectrum-gray-100);
|
108 | 70 | --mod-actionbutton-background-color-down: var(--spectrum-gray-200);
|
109 | 71 | --mod-actionbutton-background-color-focus: var(--spectrum-gray-100);
|
| 72 | + |
| 73 | + &:disabled:not(.is-selected), |
| 74 | + &.is-disabled:not(.is-selected) { |
| 75 | + --mod-actionbutton-border-color-disabled: transparent; |
| 76 | + --mod-actionbutton-background-color-disabled: transparent; |
| 77 | + } |
110 | 78 | }
|
111 | 79 |
|
112 | 80 | &.spectrum-ActionButton--staticBlack {
|
113 |
| - --mod-actionbutton-border-color-default: var(--spectrum-transparent-black-500); |
114 |
| - --mod-actionbutton-border-color-hover: var(--spectrum-transparent-black-600); |
115 |
| - --mod-actionbutton-border-color-down: var(--spectrum-transparent-black-700); |
116 |
| - --mod-actionbutton-border-color-focus: var(--spectrum-transparent-black-600); |
| 81 | + --mod-actionbutton-background-color-default: transparent; |
117 | 82 |
|
118 | 83 | --mod-actionbutton-border-color-default: var(--spectrum-transparent-black-500);
|
119 | 84 | --mod-actionbutton-border-color-hover: var(--spectrum-transparent-black-600);
|
|
132 | 97 | }
|
133 | 98 |
|
134 | 99 | &.spectrum-ActionButton--quiet {
|
135 |
| - --mod-actionbutton-background-color-default: transparent; |
136 |
| - --mod-actionbutton-background-color-hover: var(--spectrum-transparent-black-400); |
137 |
| - --mod-actionbutton-background-color-down: var(--spectrum-transparent-black-500); |
138 |
| - --mod-actionbutton-background-color-focus: var(--spectrum-transparent-black-400); |
| 100 | + --mod-actionbutton-border-color-default: transparent; |
139 | 101 | }
|
140 | 102 | }
|
141 | 103 |
|
142 | 104 | &.spectrum-ActionButton--staticWhite {
|
143 |
| - --mod-actionbutton-border-color-default: var(--spectrum-transparent-white-500); |
144 |
| - --mod-actionbutton-border-color-hover: var(--spectrum-transparent-white-600); |
145 |
| - --mod-actionbutton-border-color-down: var(--spectrum-transparent-white-700); |
146 |
| - --mod-actionbutton-border-color-focus: var(--spectrum-transparent-white-600); |
| 105 | + --mod-actionbutton-background-color-default: transparent; |
147 | 106 |
|
148 | 107 | --mod-actionbutton-border-color-default: var(--spectrum-transparent-white-500);
|
149 | 108 | --mod-actionbutton-border-color-hover: var(--spectrum-transparent-white-600);
|
|
162 | 121 | }
|
163 | 122 |
|
164 | 123 | &.spectrum-ActionButton--quiet {
|
165 |
| - --mod-actionbutton-background-color-default: transparent; |
166 |
| - --mod-actionbutton-background-color-hover: var(--spectrum-transparent-white-400); |
167 |
| - --mod-actionbutton-background-color-down: var(--spectrum-transparent-white-500); |
168 |
| - --mod-actionbutton-background-color-focus: var(--spectrum-transparent-white-400); |
| 124 | + --mod-actionbutton-border-color-default: transparent; |
169 | 125 | }
|
170 | 126 | }
|
171 | 127 |
|
|
313 | 269 | /* stylelint-disable-next-line property-no-vendor-prefix -- Correct the inability to style clickable types in iOS and Safari (normalize). */
|
314 | 270 | -webkit-appearance: button;
|
315 | 271 |
|
| 272 | + border-style: solid; |
| 273 | + |
316 | 274 | transition:
|
317 | 275 | background var(--mod-button-animation-duration, var(--spectrum-animation-duration-100)) ease-out,
|
318 | 276 | border-color var(--mod-actionbutton-animation-duration, var(--spectrum-animation-duration-100)) ease-in-out,
|
@@ -464,3 +422,43 @@ a.spectrum-ActionButton {
|
464 | 422 | /* Augment the margin correction for the icon only scenario */
|
465 | 423 | margin-inline-start: calc(var(--spectrum-actionbutton-edge-to-visual-only) - var(--spectrum-actionbutton-edge-to-text));
|
466 | 424 | }
|
| 425 | + |
| 426 | +@media (forced-colors: active) { |
| 427 | + .spectrum-ActionButton { |
| 428 | + /* force a more visible focus indicator color */ |
| 429 | + --highcontrast-actionbutton-focus-indicator-color: ButtonText; |
| 430 | + |
| 431 | + &::after { |
| 432 | + /* make sure focus indicator renders */ |
| 433 | + forced-color-adjust: none; |
| 434 | + } |
| 435 | + |
| 436 | + &.is-selected { |
| 437 | + --highcontrast-actionbutton-background-color-default: Highlight; |
| 438 | + --highcontrast-actionbutton-background-color-hover: Highlight; |
| 439 | + --highcontrast-actionbutton-background-color-focus: Highlight; |
| 440 | + --highcontrast-actionbutton-background-color-down: Highlight; |
| 441 | + --highcontrast-actionbutton-background-color-disabled: ButtonFace; |
| 442 | + |
| 443 | + --highcontrast-actionbutton-border-color-default: HighlightText; |
| 444 | + --highcontrast-actionbutton-border-color-hover: HighlightText; |
| 445 | + --highcontrast-actionbutton-border-color-focus: HighlightText; |
| 446 | + --highcontrast-actionbutton-border-color-down: HighlightText; |
| 447 | + --highcontrast-actionbutton-border-color-disabled: GrayText; |
| 448 | + |
| 449 | + --highcontrast-actionbutton-content-color-default: HighlightText; |
| 450 | + --highcontrast-actionbutton-content-color-hover: HighlightText; |
| 451 | + --highcontrast-actionbutton-content-color-focus: HighlightText; |
| 452 | + --highcontrast-actionbutton-content-color-down: HighlightText; |
| 453 | + --highcontrast-actionbutton-content-color-disabled: GrayText; |
| 454 | + |
| 455 | + .spectrum-ActionButton-icon, |
| 456 | + .spectrum-ActionButton-hold, |
| 457 | + .spectrum-ActionButton-label { |
| 458 | + /* ensure custom text colors from above get applied */ |
| 459 | + /* it seems like this shouldn't have to be done, but colors are wrong without it */ |
| 460 | + forced-color-adjust: none; |
| 461 | + } |
| 462 | + } |
| 463 | + } |
| 464 | +} |
0 commit comments