feat: floating input label

This commit is contained in:
liyasthomas
2021-08-07 14:51:13 +05:30
parent 92abbc4ce6
commit 3d963a7719
24 changed files with 132 additions and 128 deletions

View File

@@ -198,6 +198,29 @@ button {
@apply hidden;
}
.floating-input ~ label {
@apply font-semibold;
@apply py-0.5;
@apply px-2;
@apply m-2;
@apply rounded;
@apply transition;
@apply absolute;
}
.floating-input:focus-within ~ label,
.floating-input:not(:placeholder-shown) ~ label {
@apply bg-primary;
@apply transform;
@apply origin-center;
@apply scale-75;
@apply -translate-y-6;
}
.floating-input:focus-within ~ label {
@apply text-accent;
}
pre.ace_editor {
@apply font-mono;
@apply resize-none;