Repository navigation
fix: match native scrollbars to the scroll area style - #669
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Code blocks, tables, display math, and several smaller lists scrolled with the system's default scrollbar. Only the Mermaid diagram panel carried a copy of the
ScrollAreathumb, and the rest of the app scrolls throughScrollAreaitself.::-webkit-scrollbarrule in theapp.cssbase layer now draws every natively scrolling region with theScrollAreathumb: a 10px bar, a transparent track and corner, and a rounded border-colored thumb that darkens on hover. Editor blocks that ProseMirror renders outside React cannot be wrapped inScrollArea, so styling the native bar is how they match it.ScrollAreais unaffected: Base UI hides its viewport's native bar withscrollbar-width: noneand a class-scoped::-webkit-scrollbar { display: none }, which the base-layer rule does not outrank. The projected image source line and the heading outline keep their hidden bars the same way.clientHeight, so the thinner bar does not change that.Related Issue
Closes #668
Verification
pnpm exec vitest run src/features/editor/tests/editorPresentation.test.ts:app.cssholds the shared thumb rule, and the editor stylesheet defines no thumb of its own and sets noscrollbar-coloror visiblescrollbar-width, either of which makes Chromium ignore::-webkit-scrollbarstyling. The test fails against the previous editor stylesheet.vite buildemits the global rules with the declarations the Mermaid panel's rules previously compiled to.pnpm check:frontendpassed.Not verified: the rendered scrollbars were not inspected in the app in either theme.