Skip to content

Commit 7386fe8

Browse files
committed
fix(material-experimental/mdc-checkbox): Use cursor:pointer for label (#24927)
(cherry picked from commit df9303e)
1 parent 8611a74 commit 7386fe8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/material-experimental/mdc-checkbox/checkbox.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@
7474
}
7575
}
7676

77+
// Clicking the label toggles the checkbox, but MDC does not include any styles that inform the
78+
// user of this. Therefore we add the pointer cursor on top of MDC's styles.
79+
label {
80+
cursor: pointer;
81+
}
82+
83+
&.mat-mdc-checkbox-disabled label {
84+
cursor: default;
85+
}
86+
7787
// The MDC styles result in extra padding if the label is present but empty. To fix this we hide
7888
// the label when it is empty.
7989
label:empty {

0 commit comments

Comments
 (0)