From 4e48172108a768153d66bcffc81acb44b274d8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 5 Sep 2026 00:50:58 +0300 Subject: [PATCH] =?UTF-8?q?Single=20column=20again=20=E2=80=94=20the=20fit?= =?UTF-8?q?=20defect=20was=20flex=20centring=20amputating=20the=20top=20of?= =?UTF-8?q?=20a=20tall=20page,=20not=20narrowness;=20margin=20auto=20centr?= =?UTF-8?q?es=20when=20it=20fits=20and=20lets=20it=20scroll=20when=20it=20?= =?UTF-8?q?does=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/im-web/assets/main.css | 69 +---------------------------------- crates/im-web/src/pages.rs | 2 +- style/main.scss | 44 ++-------------------- 3 files changed, 6 insertions(+), 109 deletions(-) diff --git a/crates/im-web/assets/main.css b/crates/im-web/assets/main.css index 4a66d36..ab6e15e 100644 --- a/crates/im-web/assets/main.css +++ b/crates/im-web/assets/main.css @@ -273,8 +273,6 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { min-height: 100vh; min-height: 100dvh; display: flex; - align-items: center; - justify-content: center; padding: 0 40px 40px; } @@ -284,74 +282,9 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { display: flex; flex-direction: column; gap: 10px; + margin: auto; } -@media (min-width: 900px) { - .landing { - width: 1060px; - display: grid; - grid-template-columns: 1fr 1fr; - align-items: start; - gap: 16px; - } - .landing > .wordmark { - grid-column: 1/-1; - } - .landing > :nth-child(2) { - grid-column: 1; - grid-row: 2; - } - .landing > :nth-child(3) { - grid-column: 2; - grid-row: 2; - } - .landing > :nth-child(4) { - grid-column: 2; - grid-row: 3; - } - .landing > :nth-child(5) { - grid-column: 2; - grid-row: 4; - } - .landing > :nth-child(6) { - grid-column: 1; - grid-row: 3; - } - .landing > :nth-child(7) { - grid-column: 1; - grid-row: 4; - } -} -@media (min-width: 1100px) { - .landing { - width: 1320px; - grid-template-columns: 1fr 1fr 1fr; - } - .landing > :nth-child(2) { - grid-column: 1; - grid-row: 2; - } - .landing > :nth-child(3) { - grid-column: 1; - grid-row: 3; - } - .landing > :nth-child(4) { - grid-column: 2; - grid-row: 2; - } - .landing > :nth-child(5) { - grid-column: 2; - grid-row: 3; - } - .landing > :nth-child(6) { - grid-column: 3; - grid-row: 2; - } - .landing > :nth-child(7) { - grid-column: 3; - grid-row: 3; - } -} .wordmark { display: flex; align-items: center; diff --git a/crates/im-web/src/pages.rs b/crates/im-web/src/pages.rs index 78ee3bb..0d7d454 100644 --- a/crates/im-web/src/pages.rs +++ b/crates/im-web/src/pages.rs @@ -583,7 +583,7 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { let stage = view! { cx =>
-
+
(wordmark(cx).await?)
diff --git a/style/main.scss b/style/main.scss index 45a87fc..f9a7b6d 100644 --- a/style/main.scss +++ b/style/main.scss @@ -223,8 +223,6 @@ body:has(.auth-stage) { min-height: 100vh; min-height: 100dvh; display: flex; - align-items: center; - justify-content: center; padding: 0 40px 40px; } @@ -234,47 +232,13 @@ body:has(.auth-stage) { display: flex; flex-direction: column; gap: 10px; + // margin auto centres the column while it fits and top-anchors it the + // moment it outgrows the window — align-items: center on the stage used + // to amputate the top of a tall landing, unreachable even by scrolling. + margin: auto; } -// The signed-in landing is a dashboard, not a gate: six cards in one 520px -// column run twice the height of a desktop window. Wide viewports spread the -// cards across columns so the whole page is on screen; narrow ones keep the -// single file. Placement is explicit per card (source order: wordmark, -// profile, stats, sessions, preferences, password, sign-out) so the columns -// balance by height instead of pairing by source order. -@media (min-width: 900px) { - .landing { - width: 1060px; - display: grid; - grid-template-columns: 1fr 1fr; - align-items: start; - gap: 16px; - - > .wordmark { grid-column: 1 / -1; } - // Tall cards (profile, password) anchor the left; the short ones stack - // right. Row heights couple, so this pairing is what keeps it shortest. - > :nth-child(2) { grid-column: 1; grid-row: 2; } // profile - > :nth-child(3) { grid-column: 2; grid-row: 2; } // stats - > :nth-child(4) { grid-column: 2; grid-row: 3; } // sessions - > :nth-child(5) { grid-column: 2; grid-row: 4; } // preferences - > :nth-child(6) { grid-column: 1; grid-row: 3; } // password - > :nth-child(7) { grid-column: 1; grid-row: 4; } // sign out - } -} -@media (min-width: 1100px) { - .landing { - width: 1320px; - grid-template-columns: 1fr 1fr 1fr; - - > :nth-child(2) { grid-column: 1; grid-row: 2; } // profile - > :nth-child(3) { grid-column: 1; grid-row: 3; } // stats - > :nth-child(4) { grid-column: 2; grid-row: 2; } // sessions - > :nth-child(5) { grid-column: 2; grid-row: 3; } // preferences - > :nth-child(6) { grid-column: 3; grid-row: 2; } // password - > :nth-child(7) { grid-column: 3; grid-row: 3; } // sign out - } -} // The brand lockup. Lower case, and not by taste: capitalised, the dotted // `i` becomes `I` and the name reads as the English word. The tittle is the