Skip to content

Commit 5af775e

Browse files
committed
Label scale, remove input outline, increase submit opacity
1 parent d7ed9a4 commit 5af775e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/form/index.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.Form {
22
--input-label-active-position: 1.3rem;
3+
--input-label-scale: 0.8;
34

45
label {
56
display: block;
@@ -22,13 +23,15 @@
2223
input:focus,
2324
textarea:focus {
2425
~ span {
25-
transform: translateY(var(--input-label-active-position));
26+
transform: translateY(var(--input-label-active-position))
27+
scale(var(--input-label-scale));
2628
}
2729
}
2830

2931
label.has-input {
3032
span {
31-
transform: translateY(var(--input-label-active-position));
33+
transform: translateY(var(--input-label-active-position))
34+
scale(var(--input-label-scale));
3235
}
3336
}
3437

@@ -40,6 +43,8 @@
4043
font-size: 1.2rem;
4144

4245
transform: translateY(-1.5rem);
46+
transform-origin: left;
47+
4348
transition: transform 0.3s;
4449
}
4550

@@ -49,6 +54,7 @@
4954
width: 100%;
5055
margin-top: 0.2rem;
5156
border: 0;
57+
outline: none;
5258
}
5359

5460
textarea {
@@ -78,7 +84,7 @@
7884
transition: opacity 0.3s;
7985

8086
&:hover {
81-
opacity: 0.7;
87+
opacity: 0.8;
8288
}
8389
}
8490
}

0 commit comments

Comments
 (0)