Skip to content

Instantly share code, notes, and snippets.

@Nyaacinth
Created January 24, 2024 05:54
Show Gist options
  • Save Nyaacinth/8b4b6798d28c8a951c9e218fedb27b33 to your computer and use it in GitHub Desktop.
Save Nyaacinth/8b4b6798d28c8a951c9e218fedb27b33 to your computer and use it in GitHub Desktop.
A potential index.css of your web app to disable Safari's overscroll bounces effect without affecting other browsers
html {
/** Uncomment below to disable Pull to Refresh */
/* overscroll-behavior: none; */
height: 100vh;
width: 100vw;
}
@supports (height: 100dvh) and (width: 100dvw) {
html {
height: 100dvh;
width: 100dvw;
}
}
body {
height: 100%;
}
@supports (background: -webkit-named-image(i)) {
html {
overflow: hidden;
}
body {
overflow: auto;
}
}
#root-element-id-of-your-app {
height: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment