fix(launchpad): center the page on a desktop viewport and widen the column - #61
Merged
Merged
Conversation
…olumn The column was a phone width (40rem) pinned to the top-left of the background on a desktop. It is now 48rem, so a hero image has room beside the text, and it centers vertically when the viewport is taller than the page (auto margins on a flex child, which collapse to zero when the page is taller, so a phone still scrolls from the top).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a desktop the Launchpad page read as a phone page sitting on a large background: a 40rem column pinned to the top-left of the viewport with the content hugging the top.
.lpis nowmax-width: 48rem, so the hero template's image gets room beside the text instead of stacking the title five lines deep.bodyis a column flex container withmin-height: 100vh, and.lpusesmargin: auto: when the viewport is taller than the page the column sits centered vertically; when the page is taller (every phone) the auto margins collapse to zero and it scrolls from the top exactly as before. No script, no media query.Test pins both rules. 393 passing.