Skip to content

Commit b7ccc44

Browse files
Copilotdevakesu
andauthored
fix(css): replace MQ4 negation with MQ3-compatible scroll behavior guards (#109)
* Initial plan * fix(css): replace MQ Level-4 negation with MQ3-compatible two-block approach for scroll behavior Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
1 parent f0b679e commit b7ccc44

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

app/globals.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ html {
88
text-rendering: optimizeLegibility;
99
}
1010

11-
/* Desktop-only scroll behavior — avoids killing iOS momentum / rubber-band scrolling on touch/hybrid devices */
12-
@media (pointer: fine) and (not (any-pointer: coarse)) {
11+
/* Apply smooth scroll on fine-pointer devices (mouse/trackpad) */
12+
@media (pointer: fine) {
1313
html {
1414
scroll-behavior: smooth;
1515
/* Improve mouse wheel scrolling smoothness */
@@ -18,6 +18,14 @@ html {
1818
}
1919
}
2020

21+
/* Reset on any touch/coarse-pointer device (touch screens, hybrids) to preserve iOS momentum / rubber-band scrolling */
22+
@media (any-pointer: coarse) {
23+
html {
24+
scroll-behavior: auto;
25+
overscroll-behavior-y: auto;
26+
}
27+
}
28+
2129
body {
2230
/* Enable smooth momentum scrolling on all platforms */
2331
-webkit-overflow-scrolling: touch;

0 commit comments

Comments
 (0)