style/refactor: promote centered form as global style

This commit is contained in:
Adorian Doran
2026-02-10 01:26:07 +02:00
parent c06435046b
commit 29016d1cf5
3 changed files with 34 additions and 31 deletions

View File

@@ -810,3 +810,35 @@ input[type="range"] {
scrollbar-width: unset;
}
}
/*
* Centered forms
*/
.tn-centered-form {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20vh;
}
.tn-centered-form .form-group {
text-align: center;
color: var(--muted-text-color);
}
.tn-centered-form .form-icon {
font-size: 140px;
color: var(--main-border-color);
}
.tn-centered-form .protected-session-password {
margin-inline: auto;
max-width: 350px;
text-align: center;
}
.tn-centered-form input,
.tn-centered-form button {
margin-top: 12px;
}

View File

@@ -3,33 +3,4 @@
margin-inline: 40px;
flex-direction: column;
justify-content: center;
.protected-session-password-form {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20vh;
}
.form-group {
text-align: center;
color: var(--muted-text-color);
}
.form-icon {
font-size: 140px;
color: var(--main-border-color);
}
.protected-session-password {
margin-inline: auto;
max-width: 350px;
text-align: center;
}
input,
button {
margin-top: 12px;
}
}
}

View File

@@ -20,7 +20,7 @@ export default function ProtectedSession() {
}, [ passwordRef ]);
return (
<form class="protected-session-password-form" onSubmit={submitCallback}>
<form class="protected-session-password-form tn-centered-form" onSubmit={submitCallback}>
<span class="form-icon bx bx-key" />
<FormGroup name="protected-session-password-in-detail" label={t("protected_session.enter_password_instruction")}>