Skip to content

Commit abd3cbd

Browse files
committed
fix: set overscroll-behavior on sidebar to omit scroll-chaining (#61)
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
1 parent 58ef733 commit abd3cbd

File tree

8 files changed

+13
-4
lines changed

8 files changed

+13
-4
lines changed

dist/assets/stylesheets/classic/main.9a39631f.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/assets/stylesheets/classic/main.d9d44b50.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/stylesheets/modern/main.1e989742.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assets/stylesheets/modern/main.f28b7ce3.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
{% endblock %}
4848
{% block styles %}
4949
{% if config.theme.variant == "modern" %}
50-
{% set href = 'assets/stylesheets/modern/main.f28b7ce3.min.css' | url %}
50+
{% set href = 'assets/stylesheets/modern/main.1e989742.min.css' | url %}
5151
{% else %}
52-
{% set href = 'assets/stylesheets/classic/main.9a39631f.min.css' | url %}
52+
{% set href = 'assets/stylesheets/classic/main.d9d44b50.min.css' | url %}
5353
{% endif %}
5454
<link rel="stylesheet" href="{{ href }}">
5555
{% if config.theme.palette %}

src/assets/stylesheets/classic/main/components/_nav.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@
280280
overflow-y: auto;
281281
touch-action: pan-y;
282282
scroll-snap-type: y mandatory;
283+
// Prevent scroll chaining to the body when reaching the top/bottom of
284+
// the sidebar - in 2026, this works on most modern touch devices
285+
overscroll-behavior-y: contain;
283286
background-color: var(--md-default-bg-color);
284287
box-shadow:
285288
0 px2rem(1px) 0 var(--md-default-fg-color--lightest) inset;

src/assets/stylesheets/classic/main/components/_sidebar.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@
7777
margin: 0;
7878
overflow: hidden;
7979
scroll-snap-type: none;
80+
// Prevent scroll chaining to the body when reaching the top/bottom of
81+
// the sidebar - in 2026, this works on most modern touch devices
82+
overscroll-behavior-y: contain;
8083
}
8184
}
8285
}

src/assets/stylesheets/modern/main/components/_sidebar.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
position: absolute;
8181
inset: 0;
8282
margin: 0;
83+
// Prevent scroll chaining to the body when reaching the top/bottom of
84+
// the sidebar - in 2026, this works on most modern touch devices
85+
overscroll-behavior-y: contain;
8386
}
8487
}
8588
}

0 commit comments

Comments
 (0)