File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/material-experimental/mdc-checkbox Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1
1
< div class ="mdc-form-field "
2
2
[class.mdc-form-field--align-end] ="labelPosition == 'before' ">
3
3
< div #checkbox class ="mdc-checkbox ">
4
+ <!-- Render this element first so the input is on top. -->
5
+ < div class ="mat-mdc-checkbox-touch-target " (click) ="_onClick() "> </ div >
4
6
< input #nativeCheckbox
5
7
type ="checkbox "
6
8
[ngClass] ="_classes "
Original file line number Diff line number Diff line change 1
1
@use ' @material/checkbox' as mdc-checkbox ;
2
2
@use ' @material/form-field' as mdc-form-field ;
3
3
@use ' @material/ripple' as mdc-ripple ;
4
+ @use ' @material/touch-target' as mdc-touch-target ;
4
5
@use ' sass:map' ;
5
6
@use ' ../../cdk/a11y' ;
6
7
@use ' ../mdc-helpers/mdc-helpers' ;
85
86
transform : translateZ (0 );
86
87
}
87
88
}
89
+
90
+ // Element used to provide a larger tap target for users on touch devices.
91
+ .mat-mdc-checkbox-touch-target {
92
+ @include mdc-touch-target .touch-target (
93
+ $set-width : true,
94
+ $query : mdc-helpers .$mat-base-styles-query );
95
+
96
+ [dir = ' rtl' ] & {
97
+ left : 0 ;
98
+ right : 50% ;
99
+ transform : translate (50% , -50% );
100
+ }
101
+ }
You can’t perform that action at this time.
0 commit comments