Add an (optional) suffix to labels of optional fields

For now i use CSS because we are not sure whether we will keep it this
way or not and, until we finally decide, with CSS is the easiest to
remove later on.
This commit is contained in:
jordi fita mas 2023-01-29 14:25:57 +01:00
parent 1712a81dfc
commit 717ae9d5d4
1 changed files with 9 additions and 0 deletions

View File

@ -295,6 +295,15 @@ input.width-2x {
top: 1rem; top: 1rem;
} }
[lang="en"] input:not([required]) + label::after {
content: " (optional)"
}
[lang="ca"] input:not([required]) + label::after
, [lang="es"] input:not([required]) + label::after {
content: " (optional)"
}
.input label, .input input:focus ~ label { .input label, .input input:focus ~ label {
background-color: var(--numerus--background-color); background-color: var(--numerus--background-color);
top: -.9rem; top: -.9rem;