fix: make use of design system label component in select

minor tweaks to make sure input and select behaves consistently
This commit is contained in:
Christian Andolf
2025-06-13 16:23:11 +02:00
parent 4a00527d1d
commit 603c7dd2bf
7 changed files with 50 additions and 46 deletions

View File

@@ -43,23 +43,22 @@
content: ' *';
}
input:focus,
input:placeholder-shown,
input[value]:not([value='']),
textarea:focus,
textarea:placeholder-shown,
textarea[value]:not([value='']) {
& ~ .label {
font-family: var(--Label-Font-family), var(--Label-Font-fallback);
font-size: var(--Label-Size);
font-weight: var(--Label-Font-weight);
letter-spacing: var(--Label-Letter-spacing);
text-transform: unset;
line-height: 1.5;
text-decoration: none;
input:focus ~ .label,
input:placeholder-shown ~ .label,
input[value]:not([value='']) ~ .label,
textarea:focus ~ .label,
textarea:placeholder-shown ~ .label,
textarea[value]:not([value='']) ~ .label,
.selected {
font-family: var(--Label-Font-family), var(--Label-Font-fallback);
font-size: var(--Label-Size);
font-weight: var(--Label-Font-weight);
letter-spacing: var(--Label-Letter-spacing);
text-transform: unset;
line-height: 1.5;
text-decoration: none;
margin-bottom: var(--Space-x05);
}
margin-bottom: var(--Space-x025);
}
input:disabled,
@@ -79,7 +78,7 @@ textarea:disabled {
line-height: 1.5;
text-decoration: none;
margin-bottom: var(--Space-x05);
margin-bottom: var(--Space-x025);
}
}