@@ -35,13 +35,14 @@ textarea {
3535
3636[part = ' label' ] {
3737 position : absolute ;
38+ transform-origin : top left ;
3839 top : calc ($input-top-padding - #{rem (2px )} );
3940 padding-inline-end : rem (4px );
4041 transition :
4142 transform 150ms cubic-bezier (.4 , 0 , .2 , 1 ),
4243 color 150ms cubic-bezier (.4 , 0 , .2 , 1 ),
4344 font-size 150ms cubic-bezier (.4 , 0 , .2 , 1 );
44- will-change : font-size , color , transform ;
45+ will-change : transform ;
4546}
4647
4748%label-filled {
@@ -51,13 +52,12 @@ textarea {
5152}
5253
5354%label-outlined-filled {
54- top : 0 ;
55+ display : inline-block ;
56+ position : relative ;
57+ inset-block : 0 ;
5558 transform : translateY (-50% );
5659 margin-block-end : auto ;
5760 padding-inline-end : 0 ;
58- display : inline-block ;
59- position : relative ;
60- background : transparent ;
6161 font-size : rem (12px );
6262}
6363
@@ -235,10 +235,6 @@ textarea {
235235 background : var-get ($theme , ' border-background' );
236236 overflow : initial ;
237237
238- [part ~= ' labelled' ]:not ([part ~= ' filled' ]):has (textarea :not (:placeholder-shown )):not (:focus-within ) {
239- grid-template-columns : auto 1fr 1fr auto ;
240- }
241-
242238 [part ~= ' container' ] {
243239 grid-template-columns : auto auto 1fr auto ;
244240 display : grid ;
@@ -251,14 +247,16 @@ textarea {
251247 }
252248 }
253249
254- textarea :placeholder- shown + [part=' notch' ] [part=' label' ],
255- textarea:placeholder- shown ~ [part=' notch' ] [part=' label' ],
256- [part~=' filled' ] [part=' notch' ] [part=' label' ] {
257- @extend %label- outlined- filled;
250+ [part ~= ' container' ][part ~= ' filled' ],
251+ [part ~= ' container' ][part ~= ' placeholder' ] {
252+ [part = ' notch' ] {
253+ border-block-start-color : transparent ;
254+ }
258255 }
259256
260- [part ~= ' labelled' ]:not ([part ~= ' filled' ]):has (textarea :not (:placeholder-shown )):not (:focus-within ) [part = ' notch' ] {
261- border-block : rem (1px ) solid var-get ($theme , ' border-color' );
257+ [part ~= ' placeholder' ] [part = ' label' ],
258+ [part ~= ' filled' ] [part = ' label' ] {
259+ @extend %label-outlined-filled ;
262260 }
263261
264262 [part = ' start' ] {
@@ -294,8 +292,7 @@ textarea {
294292 }
295293
296294 [part = ' notch' ] {
297- border-block-start-color : transparent ;
298- border-block-end : rem (1px ) solid var-get ($theme , ' border-color' );
295+ border-block : rem (1px ) solid var-get ($theme , ' border-color' );
299296 padding : 0 rem (4px );
300297
301298 & :empty {
@@ -349,6 +346,7 @@ textarea {
349346 }
350347
351348 [part = ' notch' ] {
349+ border-block-start-color : transparent ;
352350 border-block-end-color : var-get ($theme , ' focused-border-color' );
353351 }
354352
@@ -395,11 +393,13 @@ textarea {
395393:host ([invalid ][outlined ]:not ([disabled ]):focus-within ) {
396394 [part = ' start' ],
397395 [part = ' filler' ],
398- [part = ' notch' ],
399- [part = ' end' ],
400- [part ~= ' labelled' ]:not ([part ~= ' filled' ]):has (textarea :not (:placeholder-shown )):not (:focus-within ) [part = ' notch' ] {
396+ [part = ' end' ] {
401397 border-color : var-get ($theme , ' error-secondary-color' );
402398 }
399+
400+ [part = ' notch' ] {
401+ border-block-end-color : var-get ($theme , ' error-secondary-color' );
402+ }
403403}
404404
405405:host (:disabled [outlined ]),
0 commit comments