Skip to content

Commit

Permalink
fix(slider): invisible in high contrast mode (#9792)
Browse files Browse the repository at this point in the history
Fixes the slider not being visible if the user has high contrast mode turned on.
  • Loading branch information
crisbeto authored and mmalerba committed Feb 8, 2018
1 parent 0d0c6d4 commit 94bbffc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/slider/slider.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import '../core/style/variables';
@import '../core/style/vendor-prefixes';
@import '../../cdk/a11y/a11y';


// This refers to the thickness of the slider. On a horizontal slider this is the height, on a
Expand Down Expand Up @@ -298,6 +299,12 @@ $mat-slider-focus-ring-size: 30px !default;
.mat-slider-ticks-container {
height: $mat-slider-track-thickness;
width: 100%;

@include cdk-high-contrast {
height: 0;
outline: solid $mat-slider-track-thickness;
top: $mat-slider-track-thickness / 2;
}
}

.mat-slider-ticks {
Expand Down Expand Up @@ -375,6 +382,12 @@ $mat-slider-focus-ring-size: 30px !default;
.mat-slider-ticks-container {
width: $mat-slider-track-thickness;
height: 100%;

@include cdk-high-contrast {
width: 0;
outline: solid $mat-slider-track-thickness;
left: $mat-slider-track-thickness / 2;
}
}

.mat-slider-focus-ring {
Expand Down

0 comments on commit 94bbffc

Please sign in to comment.