Skip to content

Commit 4294460

Browse files
David MartinDavid Martin
authored andcommitted
fixed mobile background
1 parent eb79a4b commit 4294460

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/layouts/Layout.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ const imageURL = image.startsWith('http') ? image : new URL(image, Astro.site).h
6868

6969
<!-- Additional meta tags for better social sharing -->
7070
<meta name="format-detection" content="telephone=no" />
71-
<meta name="theme-color" content="#000000" />
72-
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
71+
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: dark)" />
72+
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
73+
<meta name="apple-mobile-web-app-capable" content="yes" />
74+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
7375

7476
<!-- Structured Data -->
7577
<script type="application/ld+json">

src/styles/global.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ html.light {
3434
html {
3535
scroll-behavior: smooth;
3636
background-color: #000000; /* Pure black to match navbar and prevent white flash on scroll */
37+
/* Extend background into safe area on iOS - this makes the browser chrome area black */
38+
min-height: 100vh;
39+
min-height: -webkit-fill-available; /* iOS Safari fix */
3740
}
3841

3942
html.light {
@@ -46,7 +49,8 @@ html.light {
4649
background-color: var(--bg-primary);
4750
color: var(--text-primary);
4851
transition: background-color 0.3s, color 0.3s;
49-
min-height: 100vh; /* Ensure body covers viewport */
52+
min-height: 100vh;
53+
min-height: -webkit-fill-available; /* iOS Safari fix */
5054
}
5155
}
5256

0 commit comments

Comments
 (0)