Skip to content

fix(ui): scrollbar stabilize width to prevent layout jumps and fix color#1038

Merged
danielroe merged 2 commits intonpmx-dev:mainfrom
IdrisGit:fix-scrollbar-jump-on-chrome
Feb 5, 2026
Merged

fix(ui): scrollbar stabilize width to prevent layout jumps and fix color#1038
danielroe merged 2 commits intonpmx-dev:mainfrom
IdrisGit:fix-scrollbar-jump-on-chrome

Conversation

@IdrisGit
Copy link
Contributor

@IdrisGit IdrisGit commented Feb 5, 2026

screen recording of the issue and fix

scrollbar_fix_compressed.mp4

note: this fix valid for only chrome (or webkit based browser) because width values don't work on Firefox and hence the issue doesn't happen.

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Error Error Feb 5, 2026 8:08pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 5, 2026 8:08pm
npmx-lunaria Ignored Ignored Feb 5, 2026 8:08pm

Request Review

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

This PR standardises scrollbar styling: adds global scrollbar-color using CSS variables, enables scrollbar-gutter: stable on html (including html:has(dialog:modal)), and adjusts Firefox-specific rules. On the package page sidebar the scrollbar is made visible by default (from hidden to 8px), WebKit scrollbar dimensions updated, and hover/focus behaviour refactored to style track/thumb and use CSS variables for thumb hover colour instead of hard-coded values.

Possibly related PRs

Suggested reviewers

  • danielroe
  • 43081j
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description is related to the changeset, providing a screen recording and browser-specific implementation notes that correspond to the scrollbar styling changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/pages/package/[...package].vue (1)

1343-1349: ⚠️ Potential issue | 🟡 Minor

Use valid keyword values for scrollbar-width in Firefox.

The property scrollbar-width only accepts keyword values (auto, thin, none); numeric values like 8px are invalid and will be ignored. Replace with thin to ensure consistent scrollbar rendering.

🔧 Proposed fix
 .sidebar-scroll {
   scrollbar-gutter: stable;
-  scrollbar-width: 8px;
+  scrollbar-width: thin;
   scrollbar-color: transparent transparent;
 }

@danielroe danielroe added this pull request to the merge queue Feb 5, 2026
Merged via the queue into npmx-dev:main with commit fabe1c2 Feb 5, 2026
16 checks passed
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.

2 participants