2020-01-03 14:23:49 +00:00
|
|
|
.wc-block-text-input {
|
2019-12-16 22:13:41 +00:00
|
|
|
position: relative;
|
2020-03-17 11:45:33 +00:00
|
|
|
margin-bottom: $gap-large;
|
2020-03-03 10:46:53 +00:00
|
|
|
white-space: nowrap;
|
2020-03-17 11:45:33 +00:00
|
|
|
|
|
|
|
&.has-error input {
|
|
|
|
/**
|
|
|
|
* This is needed because of the input[type="*"] rules later in this
|
|
|
|
* file (and in themes like storefront) have higher specificity for
|
|
|
|
* border
|
|
|
|
*/
|
|
|
|
border-color: $error-red !important;
|
|
|
|
&:focus {
|
|
|
|
outline-color: $error-red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-error label {
|
|
|
|
color: $error-red;
|
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
}
|
|
|
|
|
2020-01-03 14:23:49 +00:00
|
|
|
.wc-block-text-input label {
|
2019-12-16 22:13:41 +00:00
|
|
|
position: absolute;
|
2020-02-17 11:12:15 +00:00
|
|
|
transform: translateY(#{$gap-small});
|
2020-02-19 15:10:26 +00:00
|
|
|
left: 0;
|
2020-01-09 18:06:49 +00:00
|
|
|
transform-origin: top left;
|
2019-12-16 22:13:41 +00:00
|
|
|
font-size: 16px;
|
|
|
|
line-height: 22px;
|
|
|
|
color: $gray-50;
|
2020-01-18 09:39:13 +00:00
|
|
|
transition: all 200ms ease;
|
2020-02-17 11:12:15 +00:00
|
|
|
margin: 0 $gap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
max-width: calc(100% - #{ 2 * $gap });
|
2020-01-18 09:39:13 +00:00
|
|
|
|
|
|
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
|
|
transition: none;
|
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
}
|
2020-02-19 15:10:26 +00:00
|
|
|
.wc-block-text-input input:-webkit-autofill + label {
|
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
|
|
|
}
|
2020-01-03 14:23:49 +00:00
|
|
|
.wc-block-text-input.is-active label {
|
2020-02-17 11:12:15 +00:00
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
2019-12-16 22:13:41 +00:00
|
|
|
}
|
2020-01-03 14:23:49 +00:00
|
|
|
.wc-block-text-input input[type="tel"],
|
|
|
|
.wc-block-text-input input[type="url"],
|
|
|
|
.wc-block-text-input input[type="text"],
|
|
|
|
.wc-block-text-input input[type="email"] {
|
2020-01-17 16:58:08 +00:00
|
|
|
background-color: #fff;
|
2019-12-16 22:13:41 +00:00
|
|
|
padding: $gap-small $gap;
|
|
|
|
border-radius: 4px;
|
|
|
|
border: 1px solid $input-border-gray;
|
|
|
|
width: 100%;
|
|
|
|
font-size: 16px;
|
|
|
|
line-height: 22px;
|
|
|
|
font-family: inherit;
|
|
|
|
margin: 0;
|
|
|
|
box-sizing: border-box;
|
|
|
|
height: 48px;
|
|
|
|
color: $input-text-active;
|
2020-01-17 16:58:08 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: #fff;
|
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
}
|
2020-01-03 14:23:49 +00:00
|
|
|
.wc-block-text-input.is-active input[type="tel"],
|
|
|
|
.wc-block-text-input.is-active input[type="url"],
|
|
|
|
.wc-block-text-input.is-active input[type="text"],
|
|
|
|
.wc-block-text-input.is-active input[type="email"] {
|
2019-12-16 22:13:41 +00:00
|
|
|
padding: $gap-large $gap $gap-smallest;
|
|
|
|
}
|