-
Notifications
You must be signed in to change notification settings - Fork 0
Support iOS safe area insets #9
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,6 +25,7 @@ | |||||||
|
|
||||||||
| html { | ||||||||
| scroll-behavior: smooth; | ||||||||
| background: linear-gradient(180deg, #f5f8fb 0%, #ebf1f7 100%); | ||||||||
| } | ||||||||
|
|
||||||||
| @media (prefers-reduced-motion: reduce) { | ||||||||
|
|
@@ -43,6 +44,7 @@ html { | |||||||
|
|
||||||||
| body { | ||||||||
| margin: 0; | ||||||||
|
||||||||
| margin: 0; | |
| margin: 0; | |
| min-height: 100vh; |
Copilot
AI
Mar 8, 2026
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.
Only the top safe-area inset is applied here. In iPhone landscape, safe-area-inset-left/right can be non-zero and the header’s inner content (via --shell = 100vw - 2rem) can still extend into the unsafe region. Consider also applying left/right safe-area padding (e.g., padding-inline) to the header (or adjusting the shell calculation) so navigation/brand content stays fully within the safe area.
| padding-top: env(safe-area-inset-top); | |
| padding-top: env(safe-area-inset-top); | |
| padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); |
Copilot
AI
Mar 8, 2026
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.
If you need to support older iOS Safari versions, env(safe-area-inset-*) may require a constant(safe-area-inset-*) fallback to work. Consider adding the constant() form before env() for both the header and footer safe-area padding declarations.
| .site-footer { | |
| .site-footer { | |
| padding: 2rem 0 calc(3rem + constant(safe-area-inset-bottom)); |
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.
scroll-behavior: smoothcombined with a sticky header means in-page#sectionnavigation can land with the target content hidden under the header. Since the header height now varies withenv(safe-area-inset-top), consider addingscroll-padding-toponhtml(orscroll-margin-topon section anchors) using the header height + safe-area inset so hash-link navigation consistently positions content below the header.