refactor: improve background colour inheritance in safari

This commit is contained in:
Carlos Valente
2026-05-09 21:59:16 +02:00
committed by Carlos Valente
parent 562f00dc7e
commit 5a33ffad92
5 changed files with 18 additions and 14 deletions
+2 -1
View File
@@ -4,9 +4,10 @@
<meta charset="utf-8" />
<base href="/" />
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="#101010" />
<meta name="ontime" content="ontime - time keeping for live events" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="apple-touch-icon" href="ontime-logo.png" />
<link rel="icon" type="image/png" href="ontime-logo.png" />
<link rel="manifest" href="site.webmanifest" />
+1 -1
View File
@@ -15,5 +15,5 @@
"start_url": "./",
"display": "",
"theme_color": "#121212",
"background_color": "#ffffff"
"background_color": "#101010"
}
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "",
"short_name": "",
"icons": [{ "src": "ontime-logo.png", "sizes": "295x295", "type": "image/png" }],
"theme_color": "#2B5ABC",
"theme_color": "#121212",
"background_color": "#101010",
"display": "standalone"
}
+1
View File
@@ -81,6 +81,7 @@ html,
user-select: none;
-webkit-app-region: drag;
isolation: isolate;
background-color: $ui-black; // prevent the safari from showing white background
}
// reset button styles
+13 -11
View File
@@ -24,16 +24,18 @@ export default function ViewLoader({ children }: PropsWithChildren) {
const colourFromParams = searchParams.get('keyColour') ?? '#101010';
return (
<Suspense
fallback={
<>
<style>{`body { background: var(--background-color-override, ${colourFromParams}); }`}</style>
<Loader />
</>
}
>
<OverrideStyles />
{children}
</Suspense>
<>
<style>{`body { background: var(--background-color-override, ${colourFromParams}); }`}</style>
<Suspense
fallback={
<>
<Loader />
</>
}
>
<OverrideStyles />
{children}
</Suspense>
</>
);
}