From 126cc78d1a4c8728cddaf4faca3ad1dbcdcaa397 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 24 Oct 2021 09:03:05 +1100 Subject: [PATCH] [v2] add `overscroll-behavior` --- .../templates/svelte/frontend/src/global.css | 1 + .../templates/templates/vanilla/frontend/src/main.css | 5 +++-- website/docs/guides/overscroll.mdx | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 website/docs/guides/overscroll.mdx diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css b/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css index 7c56cb579..3827664ca 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css @@ -13,6 +13,7 @@ body { margin: 0; width: 100%; height: 100%; + overscroll-behavior: none; } @font-face { diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/frontend/src/main.css b/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/frontend/src/main.css index af6412466..1a73a0da8 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/frontend/src/main.css +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/frontend/src/main.css @@ -8,8 +8,9 @@ body { margin: 0; color: white; font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", - "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; + "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif; + overscroll-behavior: none; } @font-face { diff --git a/website/docs/guides/overscroll.mdx b/website/docs/guides/overscroll.mdx new file mode 100644 index 000000000..bbe593bc7 --- /dev/null +++ b/website/docs/guides/overscroll.mdx @@ -0,0 +1,11 @@ + +# Overscroll + +[Overscroll](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior) is the "bounce effect" you sometimes +get when you scroll beyond a page's content boundaries. This is common in mobile apps. This can be disabled using CSS: + +```css +body { + overscroll-behavior: none; +} +``` \ No newline at end of file