File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 2
2
@use " ../settings" as * ;
3
3
4
4
@if map .get ($modules , " forms/floating" ) {
5
- // and $enable-classes {
5
+
6
6
$transition-fast : 150ms cubic-bezier (0.4 , 0 , 0.2 , 1 );
7
7
8
8
#{$parent-selector } section [role = " form" ] {
33
33
transition : 0.3s ease ;
34
34
}
35
35
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
-
47
36
> input :not (:placeholder-shown ) + label ,
48
37
> input :focus + label ,
49
38
> textarea :not (:placeholder-shown ) + label ,
60
49
transition : all $transition-fast ;
61
50
}
62
51
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
+
63
62
@if map .get ($modules , " forms/validation" ) {
64
63
> input :user- invalid:not (:placeholder-shown ) + label ,
65
64
> textarea:user- invalid:not (:placeholder-shown ) + label {
You can’t perform that action at this time.
0 commit comments