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 11< div class ="mdc-form-field "
22 [class.mdc-form-field--align-end] ="labelPosition == 'before' ">
33 < 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 >
46 < input #nativeCheckbox
57 type ="checkbox "
68 [ngClass] ="_classes "
Original file line number Diff line number Diff line change 11@use ' @material/checkbox' as mdc-checkbox ;
22@use ' @material/form-field' as mdc-form-field ;
33@use ' @material/ripple' as mdc-ripple ;
4+ @use ' @material/touch-target' as mdc-touch-target ;
45@use ' sass:map' ;
56@use ' ../../cdk/a11y' ;
67@use ' ../mdc-helpers/mdc-helpers' ;
8586 transform : translateZ (0 );
8687 }
8788}
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