@@ -47,7 +47,7 @@ governing permissions and limitations under the License.
47
47
--spectrum-slider-label-top-to-text : var (--spectrum-component-top-to-text-100 );
48
48
--spectrum-slider-control-to-field-label : var (--spectrum-slider-control-to-field-label-large );
49
49
--spectrum-slider-value-side-padding-inline : var (--spectrum-spacing-200 );
50
-
50
+
51
51
/* TODO: placeholder value for sideLabel variant value width */
52
52
--spectrum-slider-value-inline-size : 18px ;
53
53
}
@@ -316,7 +316,6 @@ governing permissions and limitations under the License.
316
316
outline : none;
317
317
318
318
& : active ,
319
- & .is-focused ,
320
319
& .is-dragged {
321
320
border-width : var (--mod-slider-handle-border-width-down , var (--spectrum-slider-handle-border-width-down ));
322
321
}
@@ -516,22 +515,6 @@ governing permissions and limitations under the License.
516
515
}
517
516
}
518
517
519
-
520
- .spectrum-Slider {
521
- & .is-disabled {
522
- cursor : default;
523
-
524
- .spectrum-Slider-handle {
525
- cursor : default;
526
- pointer-events : none;
527
- }
528
-
529
- .spectrum-Slider-tickLabel {
530
- color : var (--highcontrast-slider-label-text-color-disabled , var (--mod-slider-label-text-color-disabled , var (--spectrum-slider-label-text-color-disabled )));
531
- }
532
- }
533
- }
534
-
535
518
/* backwards compatibility: these are not required, but they make the handle go to the edegs and align right */
536
519
.spectrum-Slider-handleContainer ,
537
520
.spectrum-Slider-trackContainer {
@@ -609,15 +592,7 @@ governing permissions and limitations under the License.
609
592
.spectrum-Slider--ramp {
610
593
.spectrum-Slider-handle {
611
594
box-shadow : 0 0 0 var (--spectrum-slider-handle-gap ) var (--highcontrast-slider-ramp-handle-border-color-active , var (--mod-sectrum-slider-ramp-handle-border-color-active , var (--spectrum-slider-ramp-handle-border-color-active )));
612
- background : var (--mod-slider-ramp-handle-background-color , var (--spectrum-slider-ramp-handle-background-color ));
613
-
614
- @media (forced-colors : active) {
615
- /* forced-color-adjust required to ensure the "circle" around the handle is transparent */
616
- forced-color-adjust : none;
617
- box-shadow : 0 0 0 var (--spectrum-slider-handle-gap ) ButtonFace;
618
- border-color : ButtonText;
619
- background-color : ButtonFace;
620
- }
595
+ background : var (--mod-slider-ramp-handle-background-color , var (--highcontrast-slider-ramp-handle-background-color , var (--spectrum-slider-ramp-handle-background-color )));
621
596
}
622
597
}
623
598
@@ -648,13 +623,25 @@ governing permissions and limitations under the License.
648
623
}
649
624
650
625
.spectrum-Slider .is-disabled {
626
+ cursor : default;
627
+
628
+ .spectrum-Slider-controls {
629
+ cursor : default;
630
+ }
631
+
632
+ .spectrum-Slider-tickLabel {
633
+ color : var (--highcontrast-slider-label-text-color-disabled , var (--mod-slider-label-text-color-disabled , var (--spectrum-slider-label-text-color-disabled )));
634
+ }
635
+
651
636
.spectrum-Slider-labelContainer {
652
637
color : var (--highcontrast-slider-label-text-color-disabled , var (--mod-slider-label-text-color-disabled , var (--spectrum-slider-label-text-color-disabled )));
653
638
}
654
639
655
640
.spectrum-Slider-handle {
656
641
border-color : var (--highcontrast-slider-handle-border-color-disabled , var (--mod-slider-handle-border-color-disabled , var (--spectrum-slider-handle-border-color-disabled )));
657
642
background : var (--highcontrast-slider-handle-disabled-background-color , var (--mod-slider-handle-disabled-background-color , var (--spectrum-slider-handle-disabled-background-color )));
643
+ cursor : default;
644
+ pointer-events : none;
658
645
659
646
& : hover ,
660
647
& : active {
@@ -703,14 +690,20 @@ governing permissions and limitations under the License.
703
690
@media (forced-colors : active) {
704
691
705
692
.spectrum-Slider {
706
-
707
693
/* over-writes */
708
694
--highcontrast-slider-track-color : ButtonText;
709
695
--highcontrast-slider-track-fill-color : ButtonText;
710
696
--highcontrast-slider-ramp-track-color : ButtonText;
711
697
--highcontrast-slider-ramp-track-color-disabled : GrayText;
712
698
--highcontrast-slider-tick-mark-color : ButtonText;
713
-
699
+ --highcontrast-slider-handle-border-color : ButtonText;
700
+ --highcontrast-slider-handle-border-color-hover : Highlight;
701
+ --highcontrast-slider-handle-border-color-down : Highlight;
702
+ --highcontrast-slider-handle-border-color-key-focus : Highlight;
703
+ --highcontrast-slider-handle-focus-ring-color-key-focus : CanvasText;
704
+ --highcontrast-slider-handle-background-color : ButtonFace;
705
+ --highcontrast-slider-ramp-handle-border-color-active : ButtonFace;
706
+ --highcontrast-slider-ramp-handle-background-color : ButtonFace;
714
707
715
708
--spectrum-slider-track-color : ButtonText;
716
709
--spectrum-slider-track-fill-color : ButtonText;
@@ -732,21 +725,43 @@ governing permissions and limitations under the License.
732
725
733
726
--spectrum-slider-track-color-disabled : GrayText;
734
727
--spectrum-slider-track-fill-color-disabled : GrayText;
735
-
728
+
736
729
--spectrum-slider-handle-border-color-disabled : GrayText;
737
730
738
731
--spectrum-slider-label-text-color : CanvasText;
739
732
--spectrum-slider-label-text-color-disabled : GrayText;
740
733
741
734
--spectrum-slider-ramp-handle-border-color-active : ButtonText;
742
735
743
- }
736
+ .spectrum-Slider-handle .is-focused ::before {
737
+ forced-color-adjust : none;
738
+ }
739
+
740
+ .spectrum-Slider--ramp .spectrum-Slider-handle {
741
+ /* forced-color-adjust required to ensure the "circle" around the handle is transparent */
742
+ forced-color-adjust : none;
743
+ }
744
+
745
+ /* Slider control hover and focus colors for high contrast mode */
746
+ & : not (.is-disabled ) {
747
+ .spectrum-Slider-controls : hover ,
748
+ .spectrum-Slider-controls : active ,
749
+ .spectrum-Slider-controls : focus-within ,
750
+ .spectrum-Slider-controls .is-focused {
751
+ --highcontrast-slider-track-fill-color : Highlight;
752
+ --highcontrast-slider-track-color : Highlight;
753
+ --highcontrast-slider-handle-border-color : Highlight;
754
+ --highcontrast-slider-ramp-track-color : Highlight;
755
+ --highcontrast-slider-tick-mark-color : Highlight;
756
+ }
757
+ }
744
758
745
- /* Slider handle turns transparent in high contrast mode for ramp */
746
- .spectrum-Slider .is-disabled {
747
- .spectrum-Slider-ramp + .spectrum-Slider-handle {
748
- fill : ButtonFace;
749
- background-color : ButtonFace;
759
+ /* Slider handle turns transparent in high contrast mode for ramp */
760
+ & .is-disabled {
761
+ .spectrum-Slider-ramp + .spectrum-Slider-handle {
762
+ fill : ButtonFace;
763
+ background-color : ButtonFace;
764
+ }
750
765
}
751
766
}
752
767
}
0 commit comments