fix: more input fixes for various states: placeholder shown, focus, value, error, disabled
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
.label {
|
||||
color: var(--UI-Grey-60);
|
||||
color: var(--Text-Interactive-Placeholder);
|
||||
font-family: "fira sans";
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.03px;
|
||||
@@ -20,7 +20,7 @@ span.regular {
|
||||
}
|
||||
|
||||
span.discreet {
|
||||
color: var(--Base-Text-High-contrast);
|
||||
color: var(--Text-Interactive-Default);
|
||||
font-weight: 500;
|
||||
order: unset;
|
||||
}
|
||||
@@ -30,31 +30,19 @@ span.required:after {
|
||||
}
|
||||
|
||||
/* Handle input and textarea fields */
|
||||
input:placeholder-shown ~ .label,
|
||||
textarea:placeholder-shown ~ .label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input:focus ~ .label,
|
||||
textarea:focus ~ .label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input:placeholder-shown ~ .label,
|
||||
textarea:placeholder-shown ~ .label {
|
||||
grid-row: 1/-1;
|
||||
}
|
||||
|
||||
input:placeholder-shown:focus ~ .label,
|
||||
textarea:placeholder-shown.label {
|
||||
margin-bottom: var(--Spacing-x-half);
|
||||
input[value]:not([value=""]) ~ .label,
|
||||
textarea:focus ~ .label textarea:placeholder-shown ~ .label,
|
||||
textarea[value]:not([value=""]) ~ .label {
|
||||
font-size: 12px;
|
||||
margin-bottom: var(--Space-x05);
|
||||
}
|
||||
|
||||
input:disabled ~ .label,
|
||||
textarea:disabled ~ .label,
|
||||
:global(.select-container)[data-disabled] .label {
|
||||
color: var(--Main-Grey-40);
|
||||
color: var(--Text-Interactive-Disabled);
|
||||
}
|
||||
|
||||
/* Handle select fields */
|
||||
@@ -65,5 +53,5 @@ textarea:disabled ~ .label,
|
||||
:global(.select-container)[data-open="true"] .label:not(.discreet),
|
||||
:global(.react-aria-SelectValue):has(:nth-child(2)) .label:not(.discreet) {
|
||||
font-size: 12px;
|
||||
margin-bottom: var(--Spacing-x-half);
|
||||
margin-bottom: var(--Space-x05);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user