From cdd4a6f96b1540d0aa2ec92bfe065e9b37c25be6 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Sat, 27 Feb 2021 16:08:44 +0400 Subject: [PATCH] Fix input label font-weight transition --- src/scss/partials/_input.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/scss/partials/_input.scss b/src/scss/partials/_input.scss index d64874db..15b7ab3e 100644 --- a/src/scss/partials/_input.scss +++ b/src/scss/partials/_input.scss @@ -47,7 +47,7 @@ height: 1.5rem; transform: translate(0, 0); background-color: #fff; - transition: .2s transform, .2s padding, .1s opacity; + transition: .2s transform, .2s padding, .1s opacity, font-weight 0s .1s; transform-origin: left center; pointer-events: none; margin-top: calc((var(--height) - 1.5rem) / 2); // * Center of first line @@ -132,7 +132,6 @@ &:focus ~ .arrow-down { margin-top: -4px; transform: rotate(225deg); - -webkit-transform: rotate(225deg); border-color: $button-primary-background; } @@ -141,7 +140,10 @@ font-weight: 500; } - &:focus ~ label, &:valid ~ label, &:not(:empty) ~ label, &:disabled ~ label { + &:focus ~ label, + &:valid ~ label, + &:not(:empty) ~ label, + &:disabled ~ label { transform: translate(-.25rem, calc(var(--height) / -2 + .125rem)) scale(.75); padding: 0 6px; opacity: 1;