overhaul scrollbar styling across the app#816
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
two things changed: the global scrollbar colors are now hardcoded hsl values instead of css variables, and all per-component scrollbar classes were migrated from the tailwind-scrollbar plugin utilities to native webkit arbitrary variants.
globals.css:
scrollbar-width: thin/scrollbar-colorrule on*(firefox now falls back to default)::-webkit-scrollbar-trackbackground changed fromtransparentto a hardcoded light value (hsl(0 0% 97.6%))hsl(var(--muted-foreground)/0.5)andhsl(var(--muted-foreground))note: these are now fixed and won't adapt to dark modeper-component scrollbar classes:
[&::-webkit-scrollbar]:w-1.5to[&::-webkit-scrollbar]:w-[0.4rem](slightly narrower)scrollbar-thumb-borderto[&::-webkit-scrollbar-thumb]:bg-borderscrollbar-track-transparentto[&::-webkit-scrollbar-track]:bg-transparentscrollbar-gutter-stableadded to most scrollable containers to prevent layout shift when the scrollbar appears/disappearsaffected: public note page, pdf viewer (search, thumbnails, pages), toc, editor command menu, plus menu, code block language dropdown, app sidebar, breadcrumb, home content layout, move note/pdf dialogs, search dialog, color selector, table controls, skeleton sidebar.