@@ -322,14 +322,14 @@ a.spectrum-ActionButton {
322
322
323
323
/* Focus indicator */
324
324
.spectrum-ActionButton {
325
- transition : border-color var (--mod-actionbutton-animation-duration , var (--spectrum-actionbutton-animation-duration )) ease-in-out;
325
+ transition : border-color var (--highcontrast-actionbutton-animation-duration , var ( -- mod-actionbutton-animation-duration, var (--spectrum-actionbutton-animation-duration ) )) ease-in-out;
326
326
327
327
& ::after {
328
328
position : absolute;
329
329
inset : 0 ;
330
330
margin : calc ((var (--mod-actionbutton-focus-indicator-gap , var (--spectrum-actionbutton-focus-indicator-gap )) + var (--spectrum-actionbutton-border-width )) * -1 );
331
331
border-radius : var (--mod-actionbutton-focus-indicator-border-radius , var (--spectrum-actionbutton-focus-indicator-border-radius ));
332
- transition : box-shadow var (--mod-actionbutton-animation-duration , var (--spectrum-actionbutton-animation-duration )) ease-in-out;
332
+ transition : box-shadow var (--highcontrast-actionbutton-animation-duration , var ( -- mod-actionbutton-animation-duration, var (--spectrum-actionbutton-animation-duration ) )) ease-in-out;
333
333
pointer-events : none;
334
334
content : "" ;
335
335
}
@@ -346,18 +346,6 @@ a.spectrum-ActionButton {
346
346
347
347
@media (forced-colors : active) {
348
348
.spectrum-ActionButton {
349
- & ::after {
350
- /* Make sure the box-shadow for the focus indicator renders. */
351
- forced-color-adjust : none;
352
- }
353
-
354
- .spectrum-ActionButton-icon ,
355
- .spectrum-ActionButton-hold ,
356
- .spectrum-ActionButton-label {
357
- /* Removes the extra unwanted background on label ("readability backplate") that can cause text to be unreadable. */
358
- forced-color-adjust : none;
359
- }
360
-
361
349
/**
362
350
* Default
363
351
* - Uses "Button*" system color pairings.
@@ -372,6 +360,24 @@ a.spectrum-ActionButton {
372
360
373
361
--highcontrast-actionbutton-focus-indicator-color : CanvasText;
374
362
363
+ /**
364
+ * Avoid performance and rendering issues with transitions between system colors.
365
+ * Fixes bug in Windows High Contrast where border flashes the wrong color after hover (quiet).
366
+ */
367
+ --highcontrast-actionbutton-animation-duration : 0 ;
368
+
369
+ & ::after {
370
+ /* Make sure the box-shadow for the focus indicator renders. */
371
+ forced-color-adjust : none;
372
+ }
373
+
374
+ .spectrum-ActionButton-icon ,
375
+ .spectrum-ActionButton-hold ,
376
+ .spectrum-ActionButton-label {
377
+ /* Removes the extra unwanted background on label ("readability backplate") that can cause text to be unreadable. */
378
+ forced-color-adjust : none;
379
+ }
380
+
375
381
/**
376
382
* Quiet
377
383
* - Default blends in with background and has no border.
0 commit comments