Skip to content

Commit 1ec8af2

Browse files
committed
fix(material/slide-toggle): Increase slide-toggle transition time
Increases the animation transition time to 300ms Fixes #28916
1 parent f411903 commit 1ec8af2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/material/slide-toggle/slide-toggle.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ $_mat-slots: (tokens-mat-switch.$prefix, tokens-mat-switch.get-token-slots());
7878
}
7979

8080
&::before {
81-
transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);
81+
transition: transform 300ms 0ms cubic-bezier(0, 0, 0.2, 1);
8282
transform: translateX(0);
8383

8484
.mdc-switch--selected & {
85-
transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);
85+
transition: transform 300ms 0ms cubic-bezier(0.4, 0, 0.6, 1);
8686
transform: translateX(100%);
8787

8888
[dir='rtl'] .mdc-switch--selected & {
@@ -173,7 +173,7 @@ $_mat-slots: (tokens-mat-switch.$prefix, tokens-mat-switch.get-token-slots());
173173
pointer-events: none;
174174
position: absolute;
175175
top: 0;
176-
transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);
176+
transition: transform 300ms 0ms cubic-bezier(0.4, 0, 0.2, 1);
177177
left: 0;
178178
right: auto;
179179
transform: translateX(0);
@@ -208,9 +208,9 @@ $_mat-slots: (tokens-mat-switch.$prefix, tokens-mat-switch.get-token-slots());
208208
// Used for M3 animations. Does not affect the M2 slide-toggle
209209
// because the width and height are static, and the margin is unused.
210210
transition:
211-
width 75ms cubic-bezier(0.4, 0, 0.2, 1),
212-
height 75ms cubic-bezier(0.4, 0, 0.2, 1),
213-
margin 75ms cubic-bezier(0.4, 0, 0.2, 1);
211+
width 300ms cubic-bezier(0.4, 0, 0.2, 1),
212+
height 300ms cubic-bezier(0.4, 0, 0.2, 1),
213+
margin 300ms cubic-bezier(0.4, 0, 0.2, 1);
214214

215215
[dir='rtl'] & {
216216
left: auto;

0 commit comments

Comments
 (0)