From cbd60acc96b50bbe68c3f58847032d43994240d9 Mon Sep 17 00:00:00 2001 From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:36:18 +0100 Subject: [PATCH] fix scroll bounce effect on safari --- apps/vite/styles/reset.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/vite/styles/reset.css b/apps/vite/styles/reset.css index d31c89ed..71df37c9 100644 --- a/apps/vite/styles/reset.css +++ b/apps/vite/styles/reset.css @@ -30,13 +30,16 @@ * { margin: 0; } + /* 3. Allow percentage-based heights in the application */ html, body { - height: 100%; - overscroll-behavior: none; + height: 100vh; + width: 100vw; + overflow: hidden; + overscroll-behavior-y: none; /* not working on Safari */ } /* Typographic tweaks! @@ -46,6 +49,8 @@ body { body { line-height: 1.5; -webkit-font-smoothing: antialiased; + padding: 0; + -webkit-overflow-scrolling: touch; } /* 6. Improve media defaults