2021-04-12 10:03:36 +00:00
|
|
|
.wc-block-components-form .wc-block-components-text-input,
|
2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-text-input {
|
2019-12-16 22:13:41 +00:00
|
|
|
position: relative;
|
2023-10-13 11:13:50 +00:00
|
|
|
margin-top: $gap;
|
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 {
|
2024-07-11 17:00:49 +00:00
|
|
|
@include reset-color();
|
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;
|
2024-09-23 12:11:43 +00:00
|
|
|
transform: translateY(-50%);
|
|
|
|
line-height: 1.5;
|
2023-10-13 11:13:50 +00:00
|
|
|
left: em($gap-smaller + 1px);
|
2024-09-23 12:11:43 +00:00
|
|
|
top: 25px;
|
2020-03-23 11:22:00 +00:00
|
|
|
transform-origin: top left;
|
2024-07-11 17:00:49 +00:00
|
|
|
color: $universal-body-low-emphasis;
|
2023-10-13 11:13:50 +00:00
|
|
|
transition: all 200ms ease;
|
|
|
|
margin: 0;
|
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
|
|
|
|
2020-08-14 11:08:16 +00:00
|
|
|
.has-dark-controls & {
|
|
|
|
color: $input-placeholder-dark;
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-13 11:13:50 +00:00
|
|
|
input[type="number"] {
|
|
|
|
-moz-appearance: textfield;
|
|
|
|
&::-webkit-outer-spin-button,
|
|
|
|
&::-webkit-inner-spin-button {
|
|
|
|
appearance: none;
|
|
|
|
margin: 0;
|
|
|
|
}
|
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"],
|
2021-06-04 08:44:26 +00:00
|
|
|
input[type="number"],
|
2024-07-15 10:43:02 +00:00
|
|
|
input[type="password"],
|
2020-03-23 11:22:00 +00:00
|
|
|
input[type="email"] {
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(regular);
|
2024-06-25 15:19:49 +00:00
|
|
|
padding: em($gap) em($gap-smaller);
|
2023-10-13 11:13:50 +00:00
|
|
|
line-height: em($gap);
|
|
|
|
width: 100%;
|
2023-10-11 16:04:45 +00:00
|
|
|
border-radius: $universal-border-radius;
|
2024-07-11 17:00:49 +00:00
|
|
|
border: 1px solid $universal-border-strong;
|
2024-06-03 11:46:08 +00:00
|
|
|
|
2020-03-23 11:22:00 +00:00
|
|
|
font-family: inherit;
|
|
|
|
margin: 0;
|
|
|
|
box-sizing: border-box;
|
2020-05-14 09:07:21 +00:00
|
|
|
min-height: 0;
|
2024-07-22 10:53:59 +00:00
|
|
|
height: 50px;
|
2023-10-13 11:13:50 +00:00
|
|
|
background-color: #fff;
|
2024-07-11 17:00:49 +00:00
|
|
|
color: $input-text-active;
|
2020-03-23 11:22:00 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: #fff;
|
2024-07-11 17:00:49 +00:00
|
|
|
color: $input-text-active;
|
2021-09-14 11:26:41 +00:00
|
|
|
outline: 0;
|
2024-09-23 12:11:43 +00:00
|
|
|
border: 1.5px solid currentColor;
|
2020-03-23 11:22:00 +00:00
|
|
|
}
|
2021-04-12 10:03:36 +00:00
|
|
|
|
2020-08-14 11:08:16 +00:00
|
|
|
.has-dark-controls & {
|
|
|
|
background-color: $input-background-dark;
|
|
|
|
border-color: $input-border-dark;
|
|
|
|
color: $input-text-dark;
|
2021-04-12 10:03:36 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: $input-background-dark;
|
|
|
|
color: $input-text-dark;
|
2024-09-23 12:11:43 +00:00
|
|
|
border: 1.5px solid currentColor;
|
2021-04-12 10:03:36 +00:00
|
|
|
}
|
2020-08-14 11:08:16 +00:00
|
|
|
}
|
2020-03-23 11:22:00 +00:00
|
|
|
}
|
|
|
|
|
2023-10-13 11:13:50 +00:00
|
|
|
input:-webkit-autofill,
|
2020-03-23 11:22:00 +00:00
|
|
|
&.is-active input[type="tel"],
|
|
|
|
&.is-active input[type="url"],
|
|
|
|
&.is-active input[type="text"],
|
2021-06-04 08:44:26 +00:00
|
|
|
&.is-active input[type="number"],
|
2024-07-15 10:43:02 +00:00
|
|
|
&.is-active input[type="password"],
|
2020-03-23 11:22:00 +00:00
|
|
|
&.is-active input[type="email"] {
|
2023-10-13 11:13:50 +00:00
|
|
|
padding: em($gap + $gap-smaller) em($gap-smaller) em($gap-smaller);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-active label,
|
|
|
|
input:-webkit-autofill + label {
|
2024-09-23 12:11:43 +00:00
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
|
|
|
top: 0;
|
2020-03-23 11:22:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.has-error input {
|
2020-08-11 09:55:26 +00:00
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
2020-10-22 10:40:32 +00:00
|
|
|
border-color: $alert-red;
|
2020-08-11 09:55:26 +00:00
|
|
|
}
|
2020-03-23 11:22:00 +00:00
|
|
|
&:focus {
|
2024-09-23 12:11:43 +00:00
|
|
|
box-shadow: 0 0 0 0.5px $alert-red;
|
2020-03-23 11:22:00 +00:00
|
|
|
}
|
2022-07-06 14:03:15 +00:00
|
|
|
|
|
|
|
.has-dark-controls &,
|
|
|
|
.has-dark-controls &:hover,
|
|
|
|
.has-dark-controls &:focus,
|
|
|
|
.has-dark-controls &:active {
|
|
|
|
border-color: color.adjust($alert-red, $lightness: 30%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.has-dark-controls &:focus {
|
2024-09-23 12:11:43 +00:00
|
|
|
box-shadow: 0 0 0 0.5px color.adjust($alert-red, $lightness: 30%);
|
2022-07-06 14:03:15 +00:00
|
|
|
}
|
2020-03-23 11:22:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.has-error label {
|
2020-10-22 10:40:32 +00:00
|
|
|
color: $alert-red;
|
2022-07-06 14:03:15 +00:00
|
|
|
|
|
|
|
.has-dark-controls & {
|
|
|
|
color: color.adjust($alert-red, $lightness: 30%);
|
|
|
|
}
|
2020-01-17 16:58:08 +00:00
|
|
|
}
|
2020-04-06 15:57:38 +00:00
|
|
|
|
|
|
|
&:only-child {
|
2022-02-15 12:17:24 +00:00
|
|
|
margin-top: 1.5em;
|
2020-04-06 15:57:38 +00:00
|
|
|
}
|
2019-12-16 22:13:41 +00:00
|
|
|
}
|