File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/material-experimental/mdc-slider Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ sass_library(
2626 name = "mdc_slider_scss_lib" ,
2727 srcs = glob (["**/_*.scss" ]),
2828 deps = [
29+ "//src/cdk/a11y:a11y_scss_lib" ,
2930 "//src/material-experimental/mdc-helpers:mdc_helpers_scss_lib" ,
3031 ],
3132)
Original file line number Diff line number Diff line change 11@import ' @material/slider/mixins' ;
22@import ' ../mdc-helpers/mdc-helpers' ;
3+ @import ' ../../cdk/a11y/a11y' ;
34
45$mat-slider-min-size : 128px !default ;
56$mat-slider-horizontal-margin : 8px !default ;
@@ -24,6 +25,21 @@ $mat-slider-horizontal-margin: 8px !default;
2425 // the slider to automatically expand horizontally for backwards compatibility.
2526 width : auto ;
2627 min-width : $mat-slider-min-size - (2 * $mat-slider-horizontal-margin );
28+
29+ @include cdk-high-contrast {
30+ // The slider track isn't visible in high contrast mode so we work
31+ // around it by setting an outline and removing the height to make it look solid.
32+ .mdc-slider__track-container {
33+ height : 0 ;
34+ outline : solid 2px ;
35+ margin-top : 1px ;
36+ }
37+
38+ // Adds an outline around the thumb label so it doesn't just float on top of the slider.
39+ .mdc-slider__pin-value-marker {
40+ outline : solid 1px ;
41+ }
42+ }
2743}
2844
2945// In order to make it possible for developers to disable animations for a slider,
You can’t perform that action at this time.
0 commit comments