Skip to content

Commit 27d5b3c

Browse files
committed
fix: input focus dose't shift label
1 parent 75d2609 commit 27d5b3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@
7070
}
7171

7272
.input__group label {
73-
@apply absolute left-4 top-2 capitalize text-gray-400 transition-all duration-300 ease-linear;
73+
@apply pointer-events-none absolute left-4 top-2 capitalize text-gray-400 transition-all duration-300 ease-linear;
7474
}
7575

76-
.input__group label.active {
76+
.input__group label.active,
77+
.input__group input:focus + label {
7778
top: -1.5rem;
7879
font-size: 0.875rem;
7980
left: 0.5rem;

0 commit comments

Comments
 (0)