Skip to content

Commit 737c69f

Browse files
authored
feat(material/radio): Hovering over label of a radio will show the pointer cursor (#31894)
This is consistent with checkbox behavior. Radio used to work that way too until Angular Material v14. v15 broke it, and it remained broken until now. Fixes #26067, at least partially
1 parent b5f1f88 commit 737c69f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/material/radio/radio.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ $fallbacks: m3-radio.get-tokens();
1111
@include radio-common.radio-structure(true);
1212
@include radio-common.radio-noop-animations();
1313

14+
// Clicking the label toggles the radio, but MDC does not include any styles that inform the
15+
// user of this. Therefore we add the pointer cursor on top of MDC's styles.
16+
label {
17+
cursor: pointer;
18+
}
19+
1420
.mdc-radio__background::before {
1521
background-color: token-utils.slot(radio-ripple-color, $fallbacks);
1622
}

0 commit comments

Comments
 (0)