Split sass reset dir in to reset file and base dir.

This commit is contained in:
Fredrik Jonsson 2023-03-15 15:05:05 +01:00
commit ef541b998e

View file

@ -0,0 +1,53 @@
// stylelint-disable property-no-vendor-prefix
// Form defaults.
form {
// Add vertical rhythm margins.
@include margin-block(1);
// Set max text line width in main for readability.
.main & {
max-width: var(--max-line-width);
}
}
input,
button,
textarea,
select {
@include margin-bottom(.75);
}
label {
&:has(+ :required) {
&::after {
content: '*';
color: var(--color-mark-highlight);
}
}
}
fieldset {
border: 1px solid var(--color-border);
}
input {
// Writing "Min" instead of "min" to force use of css "min()" instead of sass "min()".
// stylelint-disable-next-line function-name-case
width: Min(20em, 100%);
}
[type='text'],
textarea {
// Writing "Min" instead of "min" to force use of css "min()" instead of sass "min()".
// stylelint-disable-next-line function-name-case
width: Min(30em, 100%);
}
input:not(:only-of-type),
textarea {
& + [type='submit'] {
display: block;
}
}