Skip to content

Build your personal knowledge base with Trilium Notes

refactor(login): remove duplicate stylesheet

Elian Dorancdf4475e6f72
diff --git a/apps/client/src/login.css b/apps/client/src/login.css
deleted file mode 100644
index d423b326de..0000000000
--- a/apps/client/src/login.css
+++ /dev/null
@@ -1,29 +0,0 @@
-/* The login page shares the set-password page's compact-card layout: the setup
- container's own padding is dropped (see set_password.css for why), and the short
- form is centred within the fixed wizard frame. */
-
-/* The password variant wraps the whole page in a <form> so the footer's submit button
- triggers its submit handler; setup.css styles every form at 80% width, which would
- squeeze the page and float the footer. display: contents makes the form layout-
- transparent so the page and its full-bleed footer fill the frame. (SSO has no form.) */
-body.setup .setup-container.login-container > form {
- display: contents;
-}
-
-body.setup .setup-container.login-container {
- padding: 0;
-}
-
-body.setup .page.login > main {
- margin: auto;
-
- @media (min-width: 700px) {
- width: 75%;
- justify-content: center;
- }
-}
-
-body.setup .page.login .login-sso {
- display: flex;
- justify-content: center;
-}
diff --git a/apps/client/src/login_page.css b/apps/client/src/login_page.css
index 064baf9b6a..ccea6dbbc3 100644
--- a/apps/client/src/login_page.css
+++ b/apps/client/src/login_page.css
@@ -1,18 +1,40 @@
body.setup .setup-container.login-container {
+ /* Drop the setup container's own padding (see set_password.css for why) and let the
+ short login form sit within the fixed wizard frame. */
+ padding: 0;
+
@media (min-width: 700px) {
height: auto;
}
+ /* The OIDC (SSO) variant has no form and a bit more breathing room. */
&.oidc {
padding-block: 4em;
}
+ /* The password variant wraps the whole page in a <form> so the footer's submit button
+ triggers its submit handler; setup.css styles every form at 80% width, which would
+ squeeze the page and float the footer. display: contents makes the form layout-
+ transparent so the page and its full-bleed footer fill the frame. */
+ > form {
+ display: contents;
+ }
+
.illustration-logo {
--size: 162px;
}
+ /* Centre the short form/card within the tall card. */
main {
padding-block: 2em;
+ margin-top: 2em;
+
+ @media (min-width: 700px) {
+ margin: auto;
+ justify-content: center;
+ width: 65%;
+ margin-top: unset;
+ }
}
.oidc-login {
diff --git a/apps/client/src/login_page.tsx b/apps/client/src/login_page.tsx
index 05c4f5a154..629725397d 100644
--- a/apps/client/src/login_page.tsx
+++ b/apps/client/src/login_page.tsx
@@ -1,5 +1,4 @@
import "./setup.css";
-import "./login.css";
import "./login_page.css";
import { LOCALE_IDS } from "@triliumnext/commons";