Skip to content

fix(css): replace MQ4 negation with MQ3-compatible scroll behavior guards#109

Merged
devakesu merged 2 commits into1.1.3from
copilot/sub-pr-107
Mar 6, 2026
Merged

fix(css): replace MQ4 negation with MQ3-compatible scroll behavior guards#109
devakesu merged 2 commits into1.1.3from
copilot/sub-pr-107

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

@media (pointer: fine) and (not (any-pointer: coarse)) uses Level 4 negation syntax that browsers may silently ignore, causing smooth scroll rules to never apply on desktop.

Changes

  • app/globals.css — replace single Level 4 query with two MQ3-compatible blocks:
    • @media (pointer: fine) applies scroll-behavior: smooth + overscroll-behavior-y: contain for mouse/trackpad devices
    • @media (any-pointer: coarse) explicitly resets both properties to auto, preserving iOS momentum/rubber-band scrolling on touch and hybrid devices
/* Before */
@media (pointer: fine) and (not (any-pointer: coarse)) { … }

/* After */
@media (pointer: fine) {
  html { scroll-behavior: smooth; overscroll-behavior-y: contain; … }
}
@media (any-pointer: coarse) {
  html { scroll-behavior: auto; overscroll-behavior-y: auto; }
}

Cascade order is intentional: on hybrids (e.g. iPad + trackpad), the coarse reset wins and preserves native scroll feel.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…pproach for scroll behavior

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mobile scroll lag and update version to v1.1.3 fix(css): replace MQ4 negation with MQ3-compatible scroll behavior guards Mar 6, 2026
@devakesu devakesu marked this pull request as ready for review March 6, 2026 06:01
Copilot AI review requested due to automatic review settings March 6, 2026 06:01
@devakesu devakesu merged commit b7ccc44 into 1.1.3 Mar 6, 2026
@devakesu devakesu deleted the copilot/sub-pr-107 branch March 6, 2026 06:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates global scroll behavior media queries to avoid Media Queries Level 4 negation syntax that can be ignored by some browsers, ensuring desktop smooth scrolling rules reliably apply while touch/hybrid devices keep native scrolling behavior.

Changes:

  • Replace the single @media (pointer: fine) and (not (any-pointer: coarse)) block with two explicit queries.
  • Apply scroll-behavior: smooth + overscroll-behavior-y: contain for fine-pointer devices and reset both to auto for any coarse-pointer devices (to preserve iOS momentum/rubber-band scrolling on touch/hybrids).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

devakesu added a commit that referenced this pull request Mar 6, 2026
* fix(mobile): scope desktop scroll CSS to pointer:fine + guard reactive-glow scroll listener — v1.1.3 (#106)

* Initial plan

* fix: mobile scroll lag + bump to v1.1.3

- scope scroll-behavior/overscroll-behavior-y to @media (pointer: fine)
- add touch device guard to reactive-glow.js scroll listener
- bump version to 1.1.3 across package.json, README.md, SECURITY.md
- update react-icons 5.5.0 → 5.6.0
- update GitHub Actions: harden-runner v2.15.1, setup-node v6.3.0,
  trivy-action v0.34.2, setup-buildx-action v4.0.0, login-action v4.0.0,
  build-push-action v7.0.0, sbom-action v0.23.0, upload-artifact v7.0.0,
  attest-build-provenance v4.1.0

Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>

* Update .github/workflows/deploy.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Devanarayanan <fusion@devakesu.com>

* Update app/globals.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Devanarayanan <fusion@devakesu.com>

---------

Signed-off-by: Devanarayanan <fusion@devakesu.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
Co-authored-by: Devanarayanan <fusion@devakesu.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: tighten hybrid-device touch guards and pin Node version in CI (#108)

* Initial plan

* fix: apply review feedback — any-pointer guard, hybrid CSS fix, pin Node 20.19.0

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>

* 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>

---------

Signed-off-by: Devanarayanan <fusion@devakesu.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants