Skip to content

Commit f266d45

Browse files
committed
Keep the header clear of the status bar
The header pads by the top safe-area inset, so its background runs up behind the status bar while its contents sit below the notch. Anchor targets add the same inset, keeping sections flush with the header.
1 parent 3bfbcc1 commit f266d45

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/layout/Header.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.site-header {
44
background: rgba(249, 251, 250, .8);
55
backdrop-filter: saturate(1.6) blur(14px);
6+
padding-top: env(safe-area-inset-top);
67
border-bottom: 1px solid transparent;
78
transition: border-color .3s;
89

‎src/styles/theme.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $offcanvas-horizontal-width: min(88vw, 380px);
3232

3333
html {
3434
scroll-behavior: smooth;
35-
scroll-padding-top: t.$header-height;
35+
scroll-padding-top: calc(#{t.$header-height} + env(safe-area-inset-top));
3636
}
3737

3838
body {

0 commit comments

Comments
 (0)