-
Notifications
You must be signed in to change notification settings - Fork 0
Extend header into iOS safe area #11
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,8 +25,6 @@ | |||||
|
|
||||||
| html { | ||||||
| scroll-behavior: smooth; | ||||||
| background: | ||||||
| linear-gradient(180deg, #0f172a 0, #0f172a 8rem, #f5f8fb 8rem, #ebf1f7 100%); | ||||||
| } | ||||||
|
|
||||||
| @media (prefers-reduced-motion: reduce) { | ||||||
|
|
@@ -45,11 +43,9 @@ html { | |||||
|
|
||||||
| body { | ||||||
| margin: 0; | ||||||
| min-height: 100svh; | ||||||
| font-family: "Source Sans 3", sans-serif; | ||||||
| color: var(--text); | ||||||
| background: | ||||||
| linear-gradient(180deg, rgba(15, 23, 42, 1) 0, rgba(15, 23, 42, 1) 8rem, rgba(245, 248, 251, 0) 8rem), | ||||||
| radial-gradient(circle at top left, rgba(103, 146, 196, 0.18), transparent 30%), | ||||||
| linear-gradient(180deg, #f5f8fb 0%, #ebf1f7 100%); | ||||||
| } | ||||||
|
Comment on lines
44
to
51
|
||||||
|
|
@@ -531,7 +527,7 @@ h1 { | |||||
| } | ||||||
|
|
||||||
| .site-footer { | ||||||
| padding: 2rem 0 calc(3rem + env(safe-area-inset-bottom)); | ||||||
| padding: 2rem 0 3rem; | ||||||
|
||||||
| padding: 2rem 0 3rem; | |
| padding: 2rem 0 calc(3rem + env(safe-area-inset-bottom, 0px)); |
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.
This change removes both the
htmlbackground andbodymin-height: 100svh. On short pages (content height < viewport height), the canvas below the body can show the browser default background rather than your intended gradient, since the body background won’t necessarily paint the full viewport without a minimum height and thehtmlbackground is now unset. To avoid visible background seams, keep a viewport-filling min-height onbody(or set a background onhtml), or otherwise ensure the page background paints the full viewport height.