File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22@use " ../settings" as * ;
33
44@if map .get ($modules , " forms/floating" ) {
5- // and $enable-classes {
5+
66 $transition-fast : 150ms cubic-bezier (0.4 , 0 , 0.2 , 1 );
77
88 #{$parent-selector } section [role = " form" ] {
3333 transition : 0.3s ease ;
3434 }
3535
36- // Used this before I tried: >select:has(option:checked:not([disabled]))+label
37- // > select + label {
38- // position: absolute;
39- // top: -5%;
40- // left: 0.8rem;
41- // padding: calc(var(--pico-spacing) * 0.25) calc(var(--pico-spacing) * 0.5);
42- // transform: translateY(-50%) scale(0.85);
43- // background: var(#{$css-var-prefix}form-element-background-color);
44- // cursor: text;
45- // }
46-
4736 > input :not (:placeholder-shown ) + label ,
4837 > input :focus + label ,
4938 > textarea :not (:placeholder-shown ) + label ,
6049 transition : all $transition-fast ;
6150 }
6251
52+ > textarea + label {
53+ top : 1rem ;
54+ transform : translateY (0 );
55+ }
56+ > textarea :not (:placeholder-shown ) + label ,
57+ > textarea :focus + label {
58+ top : 0 ;
59+ transform : translateY (-50% ) scale (0.8 );
60+ }
61+
6362 @if map .get ($modules , " forms/validation" ) {
6463 > input :user- invalid:not (:placeholder-shown ) + label ,
6564 > textarea:user- invalid:not (:placeholder-shown ) + label {
You can’t perform that action at this time.
0 commit comments