diff options
| author | Adam Soltys <[email protected]> | 2025-07-18 08:27:08 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-18 08:27:08 -0700 |
| commit | 84d04961a8fc91765837746e98545e8f109a9aa6 (patch) | |
| tree | 3a747e00a10bfe83682ae9d682008fd2a71b95e8 /src | |
| parent | 0c80f9122490002d175207374ac3a119963f6f70 (diff) | |
| download | coinos-ui-84d04961a8fc91765837746e98545e8f109a9aa6.tar.gz coinos-ui-84d04961a8fc91765837746e98545e8f109a9aa6.zip | |
fix notch spacing
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/+layout.svelte | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2b3c99bf..7e0d28a5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -25,12 +25,13 @@ $installPrompt = event; }); - if (typeof window.AndroidNotch !== "undefined") { + let hasNotch = typeof window.AndroidNotch !== "undefined"; + if (hasNotch) { window.AndroidNotch.getInsetTop( (px) => { document.documentElement.style.setProperty( "--safe-area-inset-top", - px + "px", + Math.round(px) + "px", ); }, (err) => { @@ -42,7 +43,7 @@ (px) => { document.documentElement.style.setProperty( "--safe-area-inset-bottom", - px + "px", + 24 + "px", ); }, (err) => { @@ -85,7 +86,7 @@ --toastContainerLeft: calc(50vw - 8rem); --toastBackground: #292929; - --safe-area-inset-top: 24px; + --safe-area-inset-top: 0px; --safe-area-inset-bottom: 0px; } |
