2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-text-input {
|
2019-12-16 22:13:41 +00:00
|
|
|
position: relative;
|
2020-05-29 10:16:33 +00:00
|
|
|
margin-bottom: em($gap-large);
|
2020-03-03 10:46:53 +00:00
|
|
|
white-space: nowrap;
|
2020-03-17 11:45:33 +00:00
|
|
|
|
2020-03-23 11:22:00 +00:00
|
|
|
label {
|
2020-05-14 09:07:21 +00:00
|
|
|
@include reset-typography();
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(regular);
|
2020-03-23 11:22:00 +00:00
|
|
|
position: absolute;
|
2020-04-30 10:18:12 +00:00
|
|
|
transform: translateY(0.75em);
|
2020-03-23 11:22:00 +00:00
|
|
|
left: 0;
|
2020-04-09 14:26:16 +00:00
|
|
|
top: 0;
|
2020-03-23 11:22:00 +00:00
|
|
|
transform-origin: top left;
|
2020-05-29 10:16:33 +00:00
|
|
|
line-height: 1.375; // =22px when font-size is 16px.
|
2020-03-23 11:22:00 +00:00
|
|
|
color: $gray-50;
|
|
|
|
transition: transform 200ms ease;
|
2020-05-20 13:54:37 +00:00
|
|
|
margin: 0 0 0 #{$gap + 1px};
|
2020-03-23 11:22:00 +00:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2020-05-20 13:54:37 +00:00
|
|
|
max-width: calc(100% - #{2 * $gap});
|
2020-06-08 10:55:10 +00:00
|
|
|
cursor: text;
|
2020-03-23 11:22:00 +00:00
|
|
|
|
|
|
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
|
|
transition: none;
|
2020-03-17 11:45:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-23 11:22:00 +00:00
|
|
|
input:-webkit-autofill + label {
|
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
2020-03-17 11:45:33 +00:00
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
|
2020-03-23 11:22:00 +00:00
|
|
|
&.is-active label {
|
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
2020-01-18 09:39:13 +00:00
|
|
|
}
|
2020-01-17 16:58:08 +00:00
|
|
|
|
2020-03-23 11:22:00 +00:00
|
|
|
input[type="tel"],
|
|
|
|
input[type="url"],
|
|
|
|
input[type="text"],
|
|
|
|
input[type="email"] {
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(regular);
|
2020-01-17 16:58:08 +00:00
|
|
|
background-color: #fff;
|
2020-05-29 10:16:33 +00:00
|
|
|
padding: em($gap-small) $gap;
|
2020-03-23 11:22:00 +00:00
|
|
|
border-radius: 4px;
|
|
|
|
border: 1px solid $input-border-gray;
|
|
|
|
width: 100%;
|
2020-05-29 10:16:33 +00:00
|
|
|
line-height: 1.375; // =22px when font-size is 16px.
|
2020-03-23 11:22:00 +00:00
|
|
|
font-family: inherit;
|
|
|
|
margin: 0;
|
|
|
|
box-sizing: border-box;
|
2020-05-29 10:16:33 +00:00
|
|
|
height: 3em;
|
2020-05-14 09:07:21 +00:00
|
|
|
min-height: 0;
|
2020-03-23 11:22:00 +00:00
|
|
|
color: $input-text-active;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-active input[type="tel"],
|
|
|
|
&.is-active input[type="url"],
|
|
|
|
&.is-active input[type="text"],
|
|
|
|
&.is-active input[type="email"] {
|
2020-05-29 10:16:33 +00:00
|
|
|
padding: em($gap-large) 0 em($gap-smallest) $gap;
|
2020-03-23 11:22:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.has-error input {
|
|
|
|
border-color: $error-red;
|
|
|
|
&:focus {
|
|
|
|
outline-color: $error-red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-error label {
|
|
|
|
color: $error-red;
|
2020-01-17 16:58:08 +00:00
|
|
|
}
|
2020-04-06 15:57:38 +00:00
|
|
|
|
|
|
|
&:only-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
}
|