From 24883d6f615f2415871d3c4dd15fb1288ac7b33e Mon Sep 17 00:00:00 2001 From: Miles Malerba Date: Fri, 20 May 2022 19:09:29 +0000 Subject: [PATCH] fix(material-experimental/mdc-checkbox): Use cursor:pointer for label (#24927) (cherry picked from commit df9303ea93c3f71a7a4b7404eb59ab589614d6d4) --- src/material-experimental/mdc-checkbox/checkbox.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/material-experimental/mdc-checkbox/checkbox.scss b/src/material-experimental/mdc-checkbox/checkbox.scss index 1c146a45a5cd..fb8acc0feded 100644 --- a/src/material-experimental/mdc-checkbox/checkbox.scss +++ b/src/material-experimental/mdc-checkbox/checkbox.scss @@ -74,6 +74,16 @@ } } + // Clicking the label toggles the checkbox, but MDC does not include any styles that inform the + // user of this. Therefore we add the pointer cursor on top of MDC's styles. + label { + cursor: pointer; + } + + &.mat-mdc-checkbox-disabled label { + cursor: default; + } + // The MDC styles result in extra padding if the label is present but empty. To fix this we hide // the label when it is empty. label:empty {