Style adjustments for forms.
This commit is contained in:
parent
a5a71c126f
commit
4ec8920b90
1 changed files with 10 additions and 6 deletions
|
|
@ -18,6 +18,7 @@ select {
|
|||
@include margin-bottom(.75);
|
||||
}
|
||||
|
||||
// Mark field as required if needed.
|
||||
label {
|
||||
&:has(+ :required) {
|
||||
&::after {
|
||||
|
|
@ -44,9 +45,17 @@ textarea {
|
|||
width: Min(30em, 100%);
|
||||
}
|
||||
|
||||
// For forms with multibple fields show submit button below the form.
|
||||
input:not(:only-of-type),
|
||||
textarea {
|
||||
& + [type='submit'] {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
// For forms with single field add space between it and the submit button.
|
||||
input:only-of-type {
|
||||
&:has(+ [type='submit']) {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue