@@ -8,9 +8,7 @@ $active-border-width: rem(2px) !default;
88$fs : rem (16px ) !default ;
99
1010%label {
11- --label-position : #{sizable (18px , 22px , 26px )} ;
12-
13- transform : translateY (calc (var (--label-position ) * -1 ));
11+ translate : 0 calc (var (--label-position ) * -1 );
1412}
1513
1614%floated-styles {
@@ -70,11 +68,12 @@ input:placeholder-shown + [part='notch'] [part='label'],
7068 color : var-get ($theme , ' idle-secondary-color' );
7169 transition :
7270 transform 150ms cubic-bezier (0.4 , 0 , 0.2 , 1 ),
71+ translate 150ms cubic-bezier (0.4 , 0 , 0.2 , 1 ),
7372 color 150ms cubic-bezier (0.4 , 0 , 0.2 , 1 ),
7473 font-size 150ms cubic-bezier (0.4 , 0 , 0.2 , 1 );
7574 text-overflow : ellipsis ;
7675 overflow : hidden ;
77- will-change : font-size , color , transform ;
76+ will-change : font-size , color , transform , translate ;
7877}
7978
8079[part ^= ' container' ] {
@@ -149,7 +148,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
149148:host ([readonly ]:not ([outlined ]):focus-within ) {
150149 :not ([part ~= ' filled' ]) {
151150 input :not (:placeholder-shown ) + [part = ' notch' ] [part = ' label' ] {
152- transform : translate ( 0 ) ;
151+ translate : 0 ;
153152 font-size : initial ;
154153 }
155154 }
@@ -201,7 +200,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
201200
202201 input :placeholder- shown + [part=' notch' ] [part=' label' ],
203202 [part~=' filled' ] + [part=' notch' ] [part=' label' ] {
204- transform : translateY ( -73% ) ;
203+ translate : 0 -73% ;
205204 }
206205}
207206
@@ -247,7 +246,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
247246 }
248247
249248 [part = ' notch' ] [part = ' label' ] {
250- transform : translateY ( -73% ) ;
249+ translate : 0 -73% ;
251250 }
252251}
253252
@@ -310,16 +309,11 @@ input:placeholder-shown + [part='notch'] [part='label'],
310309 padding-top : rem (20px );
311310 padding-bottom : rem (6px );
312311 }
313-
314- input :placeholder- shown + [part=' notch' ] [part=' label' ],
315- [part~=' filled' ] + [part=' notch' ] [part=' label' ] {
316- transform : translateY (-73% );
317- }
318312}
319313
320314:host ([outlined ][type = ' search' ]:focus-within ) {
321315 [part = ' notch' ] [part = ' label' ] {
322- transform : translateY ( -73% ) ;
316+ translate : 0 -73% ;
323317 }
324318}
325319
@@ -392,6 +386,8 @@ input:placeholder-shown + [part='notch'] [part='label'],
392386}
393387
394388:host ([outlined ]) {
389+ --label-position : calc ((#{var-get ($theme , ' size' )} / 2 ) - (#{$idle-border-width } ));
390+
395391 [part = ' notch' ] {
396392 border : {
397393 width : $idle-border-width ;
@@ -436,7 +432,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
436432:host (:not ([type = ' search' ])[readonly ][outlined ]:focus-within ) {
437433 :not ([part ~= ' filled' ]) {
438434 input :not (:placeholder-shown ) + [part = ' notch' ] [part = ' label' ] {
439- transform : translate ( 0 ) ;
435+ translate : 0 ;
440436 font-size : initial ;
441437 }
442438
0 commit comments