Single column again — the fit defect was flex centring amputating the top of a tall page, not narrowness; margin auto centres when it fits and lets it scroll when it does not
Browse files at this commit4e48172108a768153d66bcffc81acb44b274d8c7Parent: 4170b823 changed files +6 -109
- crates/im-web/assets/main.css +1 -68
- crates/im-web/src/pages.rs +1 -1
- style/main.scss +4 -40
crates/im-web/assets/main.cssmodified+1 -68
| @@ -273,8 +273,6 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { | ||
| 273 | 273 | min-height: 100vh; |
| 274 | 274 | min-height: 100dvh; |
| 275 | 275 | display: flex; |
| 276 | - align-items: center; | |
| 277 | - justify-content: center; | |
| 278 | 276 | padding: 0 40px 40px; |
| 279 | 277 | } |
| 280 | 278 | |
| @@ -284,74 +282,9 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { | ||
| 284 | 282 | display: flex; |
| 285 | 283 | flex-direction: column; |
| 286 | 284 | gap: 10px; |
| 285 | + margin: auto; | |
| 287 | 286 | } |
| 288 | 287 | |
| 289 | -@media (min-width: 900px) { | |
| 290 | - .landing { | |
| 291 | - width: 1060px; | |
| 292 | - display: grid; | |
| 293 | - grid-template-columns: 1fr 1fr; | |
| 294 | - align-items: start; | |
| 295 | - gap: 16px; | |
| 296 | - } | |
| 297 | - .landing > .wordmark { | |
| 298 | - grid-column: 1/-1; | |
| 299 | - } | |
| 300 | - .landing > :nth-child(2) { | |
| 301 | - grid-column: 1; | |
| 302 | - grid-row: 2; | |
| 303 | - } | |
| 304 | - .landing > :nth-child(3) { | |
| 305 | - grid-column: 2; | |
| 306 | - grid-row: 2; | |
| 307 | - } | |
| 308 | - .landing > :nth-child(4) { | |
| 309 | - grid-column: 2; | |
| 310 | - grid-row: 3; | |
| 311 | - } | |
| 312 | - .landing > :nth-child(5) { | |
| 313 | - grid-column: 2; | |
| 314 | - grid-row: 4; | |
| 315 | - } | |
| 316 | - .landing > :nth-child(6) { | |
| 317 | - grid-column: 1; | |
| 318 | - grid-row: 3; | |
| 319 | - } | |
| 320 | - .landing > :nth-child(7) { | |
| 321 | - grid-column: 1; | |
| 322 | - grid-row: 4; | |
| 323 | - } | |
| 324 | -} | |
| 325 | -@media (min-width: 1100px) { | |
| 326 | - .landing { | |
| 327 | - width: 1320px; | |
| 328 | - grid-template-columns: 1fr 1fr 1fr; | |
| 329 | - } | |
| 330 | - .landing > :nth-child(2) { | |
| 331 | - grid-column: 1; | |
| 332 | - grid-row: 2; | |
| 333 | - } | |
| 334 | - .landing > :nth-child(3) { | |
| 335 | - grid-column: 1; | |
| 336 | - grid-row: 3; | |
| 337 | - } | |
| 338 | - .landing > :nth-child(4) { | |
| 339 | - grid-column: 2; | |
| 340 | - grid-row: 2; | |
| 341 | - } | |
| 342 | - .landing > :nth-child(5) { | |
| 343 | - grid-column: 2; | |
| 344 | - grid-row: 3; | |
| 345 | - } | |
| 346 | - .landing > :nth-child(6) { | |
| 347 | - grid-column: 3; | |
| 348 | - grid-row: 2; | |
| 349 | - } | |
| 350 | - .landing > :nth-child(7) { | |
| 351 | - grid-column: 3; | |
| 352 | - grid-row: 3; | |
| 353 | - } | |
| 354 | -} | |
| 355 | 288 | .wordmark { |
| 356 | 289 | display: flex; |
| 357 | 290 | align-items: center; |
crates/im-web/src/pages.rsmodified+1 -1
| @@ -583,7 +583,7 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { | ||
| 583 | 583 | let stage = view! { |
| 584 | 584 | cx => |
| 585 | 585 | <main class="auth-stage"> |
| 586 | - <div class="auth-column landing"> | |
| 586 | + <div class="auth-column"> | |
| 587 | 587 | (wordmark(cx).await?) |
| 588 | 588 | <div class="auth-card"> |
| 589 | 589 | <div class="profile-head"> |
style/main.scssmodified+4 -40
| @@ -223,8 +223,6 @@ body:has(.auth-stage) { | ||
| 223 | 223 | min-height: 100vh; |
| 224 | 224 | min-height: 100dvh; |
| 225 | 225 | display: flex; |
| 226 | - align-items: center; | |
| 227 | - justify-content: center; | |
| 228 | 226 | padding: 0 40px 40px; |
| 229 | 227 | } |
| 230 | 228 | |
| @@ -234,47 +232,13 @@ body:has(.auth-stage) { | ||
| 234 | 232 | display: flex; |
| 235 | 233 | flex-direction: column; |
| 236 | 234 | gap: 10px; |
| 235 | + // margin auto centres the column while it fits and top-anchors it the | |
| 236 | + // moment it outgrows the window — align-items: center on the stage used | |
| 237 | + // to amputate the top of a tall landing, unreachable even by scrolling. | |
| 238 | + margin: auto; | |
| 237 | 239 | } |
| 238 | 240 | |
| 239 | -// The signed-in landing is a dashboard, not a gate: six cards in one 520px | |
| 240 | -// column run twice the height of a desktop window. Wide viewports spread the | |
| 241 | -// cards across columns so the whole page is on screen; narrow ones keep the | |
| 242 | -// single file. Placement is explicit per card (source order: wordmark, | |
| 243 | -// profile, stats, sessions, preferences, password, sign-out) so the columns | |
| 244 | -// balance by height instead of pairing by source order. | |
| 245 | -@media (min-width: 900px) { | |
| 246 | - .landing { | |
| 247 | - width: 1060px; | |
| 248 | - display: grid; | |
| 249 | - grid-template-columns: 1fr 1fr; | |
| 250 | - align-items: start; | |
| 251 | - gap: 16px; | |
| 252 | - | |
| 253 | - > .wordmark { grid-column: 1 / -1; } | |
| 254 | - // Tall cards (profile, password) anchor the left; the short ones stack | |
| 255 | - // right. Row heights couple, so this pairing is what keeps it shortest. | |
| 256 | - > :nth-child(2) { grid-column: 1; grid-row: 2; } // profile | |
| 257 | - > :nth-child(3) { grid-column: 2; grid-row: 2; } // stats | |
| 258 | - > :nth-child(4) { grid-column: 2; grid-row: 3; } // sessions | |
| 259 | - > :nth-child(5) { grid-column: 2; grid-row: 4; } // preferences | |
| 260 | - > :nth-child(6) { grid-column: 1; grid-row: 3; } // password | |
| 261 | - > :nth-child(7) { grid-column: 1; grid-row: 4; } // sign out | |
| 262 | - } | |
| 263 | -} | |
| 264 | 241 | |
| 265 | -@media (min-width: 1100px) { | |
| 266 | - .landing { | |
| 267 | - width: 1320px; | |
| 268 | - grid-template-columns: 1fr 1fr 1fr; | |
| 269 | - | |
| 270 | - > :nth-child(2) { grid-column: 1; grid-row: 2; } // profile | |
| 271 | - > :nth-child(3) { grid-column: 1; grid-row: 3; } // stats | |
| 272 | - > :nth-child(4) { grid-column: 2; grid-row: 2; } // sessions | |
| 273 | - > :nth-child(5) { grid-column: 2; grid-row: 3; } // preferences | |
| 274 | - > :nth-child(6) { grid-column: 3; grid-row: 2; } // password | |
| 275 | - > :nth-child(7) { grid-column: 3; grid-row: 3; } // sign out | |
| 276 | - } | |
| 277 | -} | |
| 278 | 242 | |
| 279 | 243 | // The brand lockup. Lower case, and not by taste: capitalised, the dotted |
| 280 | 244 | // `i` becomes `I` and the name reads as the English word. The tittle is the |