Skip to content

style: add global brand-themed scrollbar styling#1162

Open
alexchenai wants to merge 2 commits intoVoltAgent:mainfrom
alexchenai:fix/custom-scrollbar-styling
Open

style: add global brand-themed scrollbar styling#1162
alexchenai wants to merge 2 commits intoVoltAgent:mainfrom
alexchenai:fix/custom-scrollbar-styling

Conversation

@alexchenai
Copy link

@alexchenai alexchenai commented Mar 19, 2026

Summary

Fixes #1157 — Adds custom scrollbar styling across the entire VoltAgent documentation website using the brand emerald green color (#10b981).

Changes

  • Global scrollbar styles: Added Webkit (::-webkit-scrollbar) and Firefox (scrollbar-width, scrollbar-color) global scrollbar rules using emerald green (rgba(16, 185, 129, 0.3)) with smooth hover transitions
  • Light/dark theme support: Light mode uses a subtle gray track (rgba(243, 244, 246, 0.5)), dark mode uses a transparent track — both with emerald green thumbs
  • Updated TOC scrollbar: Changed existing .tableOfContents scrollbar from generic gray (rgba(107, 114, 128, ...)) to brand-consistent emerald green
  • Modern design: 8px width, 4px border-radius, transparent corners for a clean, unobtrusive look

Design Specs (from issue)

Property Value
Width 8px (global), 5px (TOC)
Thumb color rgba(16, 185, 129, 0.3)
Thumb hover rgba(16, 185, 129, 0.5)
Border radius 4px
Track (dark) transparent
Track (light) rgba(243, 244, 246, 0.5)

Test plan

  • Verify scrollbar appears with emerald green thumb in Chrome/Edge (Webkit)
  • Verify scrollbar appears correctly in Firefox (thin, emerald green)
  • Test dark mode — thumb is emerald green, track is transparent
  • Test light mode — thumb is emerald green, track is subtle gray
  • Verify TOC sidebar scrollbar uses updated brand colors
  • Confirm hover transitions work smoothly
  • Check scrollbar-corner is transparent (no white square in scroll areas)

🤖 Generated with Claude Code


Summary by cubic

Adds global brand-themed scrollbars across the docs, using emerald green thumbs with light/dark track support for a cleaner, consistent look. Closes #1157.

  • New Features

    • Global CSS for WebKit and Firefox (::-webkit-scrollbar, scrollbar-width/color) with emerald green thumbs and hover.
    • Light mode: subtle gray track; dark mode: transparent track; transparent scrollbar corner.
    • Modern proportions: 8px width, 4px radius; smooth hover transitions.
    • TOC scrollbar updated to brand green with 5px width.
  • Bug Fixes

    • Theme selectors now target root scrollbars (not only descendants) for correct light/dark styling.
    • TOC thumb border-radius corrected to 4px to match spec.

Written for commit dbd9dcd. Summary will update on new commits.

Summary by CodeRabbit

  • Style
    • Global scrollbar styling updated for more consistent look across browsers
    • Scrollbar thumb colors switched to emerald brand tones, with hover states
    • Explicit light/dark theme scrollbar overrides for better contrast
    • Table of Contents scrollbar aligned with brand color and refined (smaller corner radius)

Add custom scrollbar styles using VoltAgent's emerald green (#10b981)
brand color across the entire documentation website. This replaces
the default browser scrollbars with a modern, thin design that
supports both light and dark themes.

- Add global scrollbar styling for Webkit and Firefox browsers
- Update existing TOC scrollbar from generic gray to brand emerald green
- Support light mode (subtle gray track) and dark mode (transparent track)
- Use 8px width for modern unobtrusive appearance with 4px border-radius
- Include smooth hover transitions for better interactivity

Closes VoltAgent#1157

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Mar 19, 2026

⚠️ No Changeset found

Latest commit: dbd9dcd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b626f282-89f4-411a-b849-318079c9dd84

📥 Commits

Reviewing files that changed from the base of the PR and between c706f53 and dbd9dcd.

📒 Files selected for processing (1)
  • website/src/css/custom.css
✅ Files skipped from review due to trivial changes (1)
  • website/src/css/custom.css

📝 Walkthrough

Walkthrough

Global custom scrollbar styles were added to website/src/css/custom.css, covering Firefox (scrollbar-width, scrollbar-color) and WebKit (::-webkit-scrollbar*) selectors, with theme-specific light/dark overrides and updated TOC thumb styling.

Changes

Cohort / File(s) Summary
Scrollbar Styling
website/src/css/custom.css
Added global scrollbar rules for Firefox and WebKit, using emerald-themed thumb colors (rgba variants), 8px width, theme-specific [data-theme="light"]/[data-theme="dark"] overrides, TOC scrollbar thumb color and hover updates, and reduced TOC thumb border-radius. Also adjusted an inline comment label to reference the TOC scrollbar.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I hopped along the page so green and sleek,

Emerald thumbs that nudge when readers peek.
From light to dark the tiny tracks comply,
A gentle hover, rounded edge nearby.
Scroll on, dear reader — spring in every streak.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'style: add global brand-themed scrollbar styling' clearly and concisely summarizes the main change—adding custom scrollbar styling with brand colors across the site.
Description check ✅ Passed The description fully covers required sections: includes issue link (#1157), details changes with design specs and test plan, and mentions no new tests/docs/changesets were needed (CSS-only changes).
Linked Issues check ✅ Passed The PR successfully implements all coding objectives from #1157: emerald green scrollbars (rgba(16,185,129,0.3) thumb and 0.5 hover), 8px width, 4px border-radius, light/dark theme support with appropriate tracks, and cross-browser CSS support.
Out of Scope Changes check ✅ Passed All changes are directly in-scope: only CSS modifications to custom.css adding scrollbar styling aligned with #1157 requirements; no unrelated code changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

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: 2

🧹 Nitpick comments (1)
website/src/css/custom.css (1)

5438-5445: Dark-mode TOC thumb rules are redundant with default TOC thumb rules.

These declarations repeat the same values and can be removed to reduce CSS duplication.

♻️ Optional cleanup
-/* Dark mode TOC scrollbar */
-[data-theme="dark"] .tableOfContents::-webkit-scrollbar-thumb {
-  background-color: rgba(16, 185, 129, 0.3);
-}
-
-[data-theme="dark"] .tableOfContents::-webkit-scrollbar-thumb:hover {
-  background-color: rgba(16, 185, 129, 0.5);
-}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@website/src/css/custom.css` around lines 5438 - 5445, The dark-mode TOC
scrollbar thumb rules are redundant with the default TOC thumb rules; remove the
duplicate selectors and declarations that target [data-theme="dark"]
.tableOfContents::-webkit-scrollbar-thumb and its :hover variant so only the
shared/default .tableOfContents::-webkit-scrollbar-thumb and
.tableOfContents::-webkit-scrollbar-thumb:hover rules remain, keeping visual
behavior unchanged and eliminating CSS duplication.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@website/src/css/custom.css`:
- Around line 5429-5435: The TOC scrollbar thumb selectors
".tableOfContents::-webkit-scrollbar-thumb" and
".tableOfContents::-webkit-scrollbar-thumb:hover" use border-radius: 10px but
the design spec requires 4px; update both selectors to use border-radius: 4px so
the thumb and its hover state match the 4px radius requirement.
- Around line 5395-5418: The theme-based scrollbar rules miss the root element
because descendant selectors are used; update selectors so they target the
element with the data-theme attribute itself (not only its descendants): replace
`[data-theme="light"] *` with `[data-theme="light"]` and `[data-theme="dark"] *`
with `[data-theme="dark"]`, and remove the space before pseudo-elements so `
[data-theme="light"] ::-webkit-scrollbar-track` and similar become
`[data-theme="light"]::-webkit-scrollbar-track` (and likewise for dark) so the
page/viewport scrollbar receives the intended styles.

---

Nitpick comments:
In `@website/src/css/custom.css`:
- Around line 5438-5445: The dark-mode TOC scrollbar thumb rules are redundant
with the default TOC thumb rules; remove the duplicate selectors and
declarations that target [data-theme="dark"]
.tableOfContents::-webkit-scrollbar-thumb and its :hover variant so only the
shared/default .tableOfContents::-webkit-scrollbar-thumb and
.tableOfContents::-webkit-scrollbar-thumb:hover rules remain, keeping visual
behavior unchanged and eliminating CSS duplication.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7998704-4238-4a8f-bf09-1ed09a246943

📥 Commits

Reviewing files that changed from the base of the PR and between bc59b3e and c706f53.

📒 Files selected for processing (1)
  • website/src/css/custom.css

Comment on lines 5429 to +5435
.tableOfContents::-webkit-scrollbar-thumb {
background-color: rgba(107, 114, 128, 0.3);
background-color: rgba(16, 185, 129, 0.3);
border-radius: 10px;
}

.tableOfContents::-webkit-scrollbar-thumb:hover {
background-color: rgba(107, 114, 128, 0.5);
background-color: rgba(16, 185, 129, 0.5);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

TOC thumb radius does not match the 4px design spec.

Line 5431 still uses border-radius: 10px; spec/objective calls for 4px.

🎯 Proposed fix
 .tableOfContents::-webkit-scrollbar-thumb {
   background-color: rgba(16, 185, 129, 0.3);
-  border-radius: 10px;
+  border-radius: 4px;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.tableOfContents::-webkit-scrollbar-thumb {
background-color: rgba(107, 114, 128, 0.3);
background-color: rgba(16, 185, 129, 0.3);
border-radius: 10px;
}
.tableOfContents::-webkit-scrollbar-thumb:hover {
background-color: rgba(107, 114, 128, 0.5);
background-color: rgba(16, 185, 129, 0.5);
.tableOfContents::-webkit-scrollbar-thumb {
background-color: rgba(16, 185, 129, 0.3);
border-radius: 4px;
}
.tableOfContents::-webkit-scrollbar-thumb:hover {
background-color: rgba(16, 185, 129, 0.5);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@website/src/css/custom.css` around lines 5429 - 5435, The TOC scrollbar thumb
selectors ".tableOfContents::-webkit-scrollbar-thumb" and
".tableOfContents::-webkit-scrollbar-thumb:hover" use border-radius: 10px but
the design spec requires 4px; update both selectors to use border-radius: 4px so
the thumb and its hover state match the 4px radius requirement.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

- Fix theme selectors to target root element scrollbar (not just descendants)
  by adding selectors without space before pseudo-elements
- Fix TOC thumb border-radius from 10px to 4px to match design spec
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.

[DOC] Improve website scrollbar styling to match brand theme and enhance user experience

1 participant