-
-
Notifications
You must be signed in to change notification settings - Fork 690
docs: Add custom scrollbar styling to match brand theme #1165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| @import "./scrollbar.css"; | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| /* ============================================ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Dark-mode scrollbar overrides use descendant selectors and miss the root element, so viewport scrollbar colors may stay light in dark theme. Prompt for AI agents |
||
| Custom Scrollbar Styling - VoltAgent Brand | ||
| Issue #1157 | ||
| ============================================ */ | ||
|
|
||
| /* Light Mode Scrollbar */ | ||
| ::-webkit-scrollbar { | ||
| width: 8px; | ||
| height: 8px; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-track { | ||
| background: rgba(0, 0, 0, 0.05); | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-thumb { | ||
| background: rgba(16, 185, 129, 0.3); | ||
| border-radius: 4px; | ||
| transition: all 0.2s ease; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-thumb:hover { | ||
| background: rgba(16, 185, 129, 0.5); | ||
| } | ||
|
Comment on lines
+17
to
+25
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Increase default thumb contrast to meet accessibility intent. Current default thumb opacity is too subtle (especially Line 18 and Line 37), making the scrollbar hard to perceive in both themes. This conflicts with the PR’s accessibility objective. 🎯 Suggested contrast-safe adjustment ::-webkit-scrollbar-thumb {
- background: rgba(16, 185, 129, 0.3);
+ background: rgba(16, 185, 129, 0.55);
border-radius: 4px;
- transition: all 0.2s ease;
+ transition: background-color 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
- background: rgba(16, 185, 129, 0.5);
+ background: rgba(16, 185, 129, 0.75);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
- background: rgba(16, 185, 129, 0.25);
+ background: rgba(16, 185, 129, 0.5);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
- background: rgba(16, 185, 129, 0.45);
+ background: rgba(16, 185, 129, 0.7);
}
* {
scrollbar-width: thin;
- scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
+ scrollbar-color: rgba(16, 185, 129, 0.55) transparent;
}
html[data-theme="dark"] * {
- scrollbar-color: rgba(16, 185, 129, 0.25) rgba(255, 255, 255, 0.05);
+ scrollbar-color: rgba(16, 185, 129, 0.5) rgba(255, 255, 255, 0.08);
}Also applies to: 36-42, 45-52 🤖 Prompt for AI Agents |
||
|
|
||
| ::-webkit-scrollbar-corner { | ||
| background: transparent; | ||
| } | ||
|
|
||
| /* Dark Mode Scrollbar */ | ||
| html[data-theme="dark"] ::-webkit-scrollbar-track { | ||
| background: rgba(255, 255, 255, 0.05); | ||
| } | ||
|
|
||
| html[data-theme="dark"] ::-webkit-scrollbar-thumb { | ||
| background: rgba(16, 185, 129, 0.25); | ||
| } | ||
|
|
||
| html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { | ||
| background: rgba(16, 185, 129, 0.45); | ||
| } | ||
|
|
||
| /* Firefox Support */ | ||
| * { | ||
| scrollbar-width: thin; | ||
| scrollbar-color: rgba(16, 185, 129, 0.3) transparent; | ||
| } | ||
|
|
||
| html[data-theme="dark"] * { | ||
| scrollbar-color: rgba(16, 185, 129, 0.25) rgba(255, 255, 255, 0.05); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Global brand scrollbar import is overridden by existing TOC-specific scrollbar rules, causing TOC to keep old gray styling and break theme consistency.
Prompt for AI agents