Skip to content

Commit 3bbcb44

Browse files
committed
fix(material-experimental/mdc-checkbox): add missing classes for checked (#24350)
and disabled on host (cherry picked from commit 3523adf)
1 parent 70bec60 commit 3bbcb44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ const _MatCheckboxBase = mixinColor(
8080
'[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,
8181
'[class.mdc-checkbox--disabled]': 'disabled',
8282
'[id]': 'id',
83+
// Add classes that users can use to more easily target disabled or checked checkboxes.
84+
'[class.mat-mdc-checkbox-disabled]': 'disabled',
85+
'[class.mat-mdc-checkbox-checked]': 'checked',
8386
},
8487
providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],
8588
exportAs: 'matCheckbox',

0 commit comments

Comments
 (0)