Skip to content

Commit 5251c27

Browse files
crisbetohansl
authored andcommitted
fix(checkbox): wrong cursor when disabled (#908)
Fixes the checkbox using a pointer cursor, even when the element is disabled. Fixes #907.
1 parent 0be5155 commit 5251c27

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/checkbox/checkbox.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,13 @@ $_md-checkbox-indeterminate-checked-easing-function: cubic-bezier(0.14, 0, 0, 1)
218218
}
219219

220220
md-checkbox {
221-
&, label {
222-
cursor: pointer;
223-
}
221+
cursor: pointer;
224222
}
225223

226224
.md-checkbox-layout {
225+
// `cursor: inherit` ensures that the wrapper element gets the same cursor as the md-checkbox
226+
// (e.g. pointer by default, regular when disabled), instead of the browser default.
227+
cursor: inherit;
227228
align-items: baseline;
228229
display: inline-flex;
229230
}

0 commit comments

Comments
 (0)