Repository navigation
Slightly crop the homepage globe on mobile #1593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ export function HomeCommunitySection() { | |
| return ( | ||
| <section | ||
| aria-labelledby="maintainers" | ||
| className="@container isolate mx-auto flex w-full max-w-(--breakpoint-lg) flex-col gap-4 px-4 [--globe-width:calc(100cqw+2rem)] [--globe-height:min(calc(var(--globe-width)*1.25),calc(100svh-var(--navbar-height)))] sm:[--globe-width:min(120cqw,calc(100vw-1rem))] sm:[--globe-height:var(--globe-width)]" | ||
| className="@container isolate mx-auto flex w-full max-w-(--breakpoint-lg) flex-col gap-4 px-4 [--globe-width:calc(100cqw+2rem)] [--globe-height:calc(var(--globe-width)*1.25)] sm:[--globe-width:min(120cqw,calc(100vw-1rem))] sm:[--globe-height:var(--globe-width)]" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the globe usable on short mobile viewports. At 600×320, this sets the globe height to 750px. Users cannot see the full globe and its bottom controls together without scrolling. Restore a viewport-height cap and make the mobile projection fit the resulting height. (github.com)
|
||
| > | ||
| <header className="sm:mb-10 lg:-mt-6"> | ||
| <h2 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the mobile default globe within the viewport gutters.
The new mobile projection sets the globe diameter to 1.06 × the surface width. At 390px, the default globe is about 413px. The content area between the 16px gutters is 358px, so the globe extends past both gutters and clips at the viewport edges.
Restore the previous fit to the content width between the gutters, using
Math.min(paintWidth, paintHeight) - 2 * viewportGutterin the projection. This keeps the default within the gutters, as the PR requires. If the side crop is intended, change the PR requirement first, then update the sizing.