From 8243b1623f68a313b1970441a45b1fa3ced172b4 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 1 Sep 2017 17:04:09 +0200 Subject: [PATCH] fix(slider): thumb disappearing on disabled element with thumb label (#6641) Fixes the slider thumb becoming hidden when a disabled slider with a thumb label is focused. Fixes #6631. --- src/lib/slider/slider.scss | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/lib/slider/slider.scss b/src/lib/slider/slider.scss index 1a2b36e59b47..f27f052bd1b2 100644 --- a/src/lib/slider/slider.scss +++ b/src/lib/slider/slider.scss @@ -214,26 +214,28 @@ $mat-slider-focus-ring-size: 30px !default; // Active slider. -.cdk-focused { - &.mat-slider-thumb-label-showing .mat-slider-thumb { - transform: scale(0); - } +.mat-slider:not(.mat-slider-disabled) { + &.cdk-focused { + &.mat-slider-thumb-label-showing .mat-slider-thumb { + transform: scale(0); + } - .mat-slider-thumb-label { - border-radius: 50% 50% 0; - } + .mat-slider-thumb-label { + border-radius: 50% 50% 0; + } - .mat-slider-thumb-label-text { - opacity: 1; + .mat-slider-thumb-label-text { + opacity: 1; + } } -} -.cdk-mouse-focused, -.cdk-touch-focused, -.cdk-program-focused { - .mat-slider-thumb { - border-width: $mat-slider-thumb-border-width-active; - transform: scale($mat-slider-thumb-focus-scale); + &.cdk-mouse-focused, + &.cdk-touch-focused, + &.cdk-program-focused { + .mat-slider-thumb { + border-width: $mat-slider-thumb-border-width-active; + transform: scale($mat-slider-thumb-focus-scale); + } } }