# CSS overscroll-behavior and swipe gestures on macOS

Disable macOS's rubber-band scrolling without sacrificing your browser's back
and forward swipe gestures.

To make a web app "feel more like a native app", or simply to suit your personal
preference, you can disable the rubber-band effect at the edges of the page with
`overscroll-behavior`:

```css
html,
body {
  overscroll-behavior: none;
}
```

**Be careful, though:** the shorthand applies to both axes. On macOS, this can
disable the "Swipe between pages" trackpad or Magic Mouse gesture, which
browsers use for back and forward navigation.

If you only want to suppress vertical overscroll, set the y-axis property
instead. This leaves the horizontal gesture available:

```css
html,
body {
  overscroll-behavior-y: none;
}
```

This changes what happens when scrolling reaches the edge of the page. It does
not disable inertial, or momentum, scrolling itself.

## Gesture settings in macOS

The gestures can be configured in: System Settings > Trackpad/Mouse > More
gestures > Swipe between pages.
