woocommerce/packages/js/components/src/text-control/style.scss

116 lines
2.3 KiB
SCSS

.muriel-input-text {
background: $studio-white;
border: 1px solid $studio-gray-20;
border-radius: 3px;
height: 56px;
box-shadow: none;
padding: 12px 12px 4px;
position: relative;
box-shadow: $shadow-popover;
&:hover {
border-color: $studio-gray-40;
}
label {
color: $studio-gray-50;
font-size: 14px;
line-height: 21px;
&.components-base-control__label {
margin: 0;
}
}
// @wordpress/components styles for text control target all types, so we must also do that
// to increase specificity and override the styles.
.components-text-control__input,
.components-text-control__input[type='text'],
.components-text-control__input[type='tel'],
.components-text-control__input[type='time'],
.components-text-control__input[type='url'],
.components-text-control__input[type='week'],
.components-text-control__input[type='password'],
.components-text-control__input[type='color'],
.components-text-control__input[type='date'],
.components-text-control__input[type='datetime'],
.components-text-control__input[type='datetime-local'],
.components-text-control__input[type='email'],
.components-text-control__input[type='month'],
.components-text-control__input[type='number'] {
border: 0;
box-shadow: none;
font-size: 16px;
line-height: 21px;
margin: 0;
padding: 0;
min-height: 30px;
&:focus {
box-shadow: none;
}
}
&.active {
box-shadow: 0 0 0 2px var(--wp-admin-theme-color);
border-color: transparent;
input {
color: $studio-gray-80;
}
}
&.with-value {
.components-base-control__label {
display: block;
position: relative;
top: -8px;
width: 100%;
font-size: 12px;
}
input {
color: $studio-gray-80;
position: relative;
top: -12px;
}
}
&.empty {
label {
display: none;
}
input {
color: $studio-gray-50;
}
}
&.has-error {
box-shadow: none;
}
&.disabled {
label {
display: none;
}
input {
color: $studio-gray-20;
/* Placeholder styling: */
&::placeholder {
/* Chrome, Firefox, Opera, Safari 10.1+ */
color: $studio-gray-20;
opacity: 1; /* Firefox */
}
&:-ms-input-placeholder {
/* Internet Explorer 10-11 */
color: $studio-gray-20;
}
&::-ms-input-placeholder {
/* Microsoft Edge */
color: $studio-gray-20;
}
}
}
}