fix: use 100dvh for mobile sign-in page centering #161
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-landing!161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "154-fix-mobile-signin-centering"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On 390px mobile viewports,
/signinand/forgot-passwordpages render with content pushed to the bottom half.100vhincludes mobile browser chrome (URL bar), making the container taller than the visible area and breaking vertical centering. Switching to100dvh(dynamic viewport height) accounts for browser chrome.Changes
src/app.css—.signin-page: changedmin-height: 100vhtomin-height: 100dvhsrc/routes/(app)/forgot-password/+page.svelte—.forgot-page: changedmin-height: 100vhtomin-height: 100dvhReview Checklist
dvhhas broad browser support (Chrome 108+, Safari 15.4+, Firefox 94+)Test Plan
/signinon a 390px mobile viewport (or real phone) — content should be vertically centered/forgot-passwordon a 390px mobile viewport — content should be vertically centeredRelated Notes
Related
PR #161 Review
DOMAIN REVIEW
Tech stack: SvelteKit / CSS (static landing site)
CSS change analysis:
The diff is minimal and precise. Two files, one property change each:
src/app.cssline 2686:.signin-pagemin-height: 100vh->min-height: 100dvhsrc/routes/(app)/forgot-password/+page.svelteline 87:.forgot-pagemin-height: 100vh->min-height: 100dvhBoth selectors use the same flex centering pattern (
display: flex; align-items: center; justify-content: center; min-height: ...), which is exactly the pattern broken by mobile browser chrome. The fix is correct.dvh browser support: Chrome 108+ (Dec 2022), Safari 15.4+ (Mar 2022), Firefox 94+ (Nov 2021). Effectively universal for the target audience (parents on modern phones). Desktop is unaffected --
dvhequalsvhwhen no browser chrome is present.No logic changes, no JS changes, no new dependencies. This is a pure CSS property value swap.
BLOCKERS
None.
This is a 2-line CSS fix with no logic, no user input, no auth paths, and no new functionality. None of the BLOCKER criteria apply:
NITS
Fallback for older browsers (low risk): If a browser does not understand
dvh, the entiremin-heightdeclaration is silently dropped. A defensive pattern would be:Given the target audience and support dates (3+ years old), this is cosmetic rather than practical. Non-blocking.
Discovered scope -- other pages with the same
100vhpattern: The repo has 6 additional100vhcentering containers that will exhibit the same mobile bug:src/app.cssline 3372:.auth-page(flex centered, same pattern)src/routes/(app)/reset-password/+page.svelteline 155:.reset-pagesrc/routes/(app)/checkout/cancel/+page.svelteline 32:.cancel-pagesrc/routes/(app)/checkout/success/+page.svelteline 17:.success-pagesrc/routes/(app)/checkout/+page.svelteline 258:.checkout-page(padding-only, less impacted)src/routes/(app)/+layout.svelteline 83: inline style on loading spinner divThis is not a blocker for this PR -- the PR correctly fixes the two pages specified in issue #154. But these other pages should be tracked as discovered scope in a new Forgejo issue.
SOP COMPLIANCE
154-fix-mobile-signin-centeringreferences issue #154Closes #154fix: use 100dvh for mobile sign-in page centering)PROCESS OBSERVATIONS
100vhflex-centered containers should get their own issue to avoid the same bug report recurring for different pages.VERDICT: APPROVED