Move label styles from reset to form.

This commit is contained in:
Fredrik Jonsson 2024-04-23 18:37:41 +02:00
commit 2a809d994d
2 changed files with 5 additions and 11 deletions

View file

@ -62,11 +62,6 @@ select {
max-width: 100%; max-width: 100%;
} }
label {
display: block;
font-weight: var(--fw-bold);
}
[type='search'] { [type='search'] {
@include respond-to(s) { @include respond-to(s) {
// Correct the odd appearance in Safari on desktop. // Correct the odd appearance in Safari on desktop.
@ -74,10 +69,6 @@ label {
} }
} }
// Text-level semantics
//
// The elements in this section give semantics to inline text.
// Code // Code
code, code,

View file

@ -13,8 +13,11 @@ select {
@include margin-block(0 1); @include margin-block(0 1);
} }
// Mark field as required if needed.
label { label {
display: block;
font-weight: var(--fw-bold);
// Mark field as required if needed.
&:has(+ :required) { &:has(+ :required) {
&::after { &::after {
content: '*'; content: '*';
@ -23,7 +26,7 @@ label {
} }
} }
// Set max text line width in main for readability. // Set max text line width for readability.
input, input,
label, label,
textarea, textarea,