File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
src/material/slide-toggle Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 2020 [attr.aria-disabled] ="disabled && disabledInteractive ? 'true' : null "
2121 (click) ="_handleClick() "
2222 #switch >
23+ <!-- Render this element first so the input is on top. -->
24+ < div class ="mat-mdc-slide-toggle-touch-target "> </ div >
2325 < span class ="mdc-switch__track "> </ span >
2426 < span class ="mdc-switch__handle-track ">
2527 < span class ="mdc-switch__handle ">
Original file line number Diff line number Diff line change @@ -542,3 +542,20 @@ $fallbacks: m3-slide-toggle.get-tokens();
542542 color : token-utils .slot (slide-toggle-disabled-label-text-color , $fallbacks );
543543 }
544544}
545+
546+ // Element used to provide a larger tap target for users on touch devices.
547+ .mat-mdc-slide-toggle-touch-target {
548+ position : absolute ;
549+ top : 50% ;
550+ left : 50% ;
551+ height : 48px ;
552+ width : 100% ;
553+ transform : translate (-50% , -50% );
554+ // display: token-utils.slot(radio-touch-target-display, $fallbacks);
555+
556+ [dir = ' rtl' ] & {
557+ left : auto ;
558+ right : 50% ;
559+ transform : translate (50% , -50% );
560+ }
561+ }
You can’t perform that action at this time.
0 commit comments