Skip to content

Add scrollbar-gutter-* utilities#20018

Open
RobinMalfait wants to merge 4 commits intomainfrom
feat/add-scrollbar-gutter
Open

Add scrollbar-gutter-* utilities#20018
RobinMalfait wants to merge 4 commits intomainfrom
feat/add-scrollbar-gutter

Conversation

@RobinMalfait
Copy link
Copy Markdown
Member

This PR adds new scrollbar-gutter-* utilities. The API looks like this:

Class CSS
scrollbar-gutter-auto scrollbar-gutter: auto
scrollbar-gutter-stable scrollbar-gutter: stable
scrollbar-gutter-both scrollbar-gutter: stable both-edges

@RobinMalfait RobinMalfait requested a review from a team as a code owner May 7, 2026 08:41
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Confidence Score: 5/5

Safe to merge — the change is additive, experimental-gated, and all affected snapshots are updated.

The new utilities are minimal static declarations with correct CSS values, gated behind the same experimental flag as the rest of the scrollbar utilities. The property-order additions explain all snapshot ordering changes, tests cover valid and invalid inputs, and no existing behavior is modified.

No files require special attention.

Reviews (4): Last reviewed commit: "Add `scrollbar-width` and `scrollbar-col..." | Re-trigger Greptile

Comment on lines +134 to 136
'scrollbar-gutter',

'list-style-position',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The other scrollbar-* CSS properties (scrollbar-width and scrollbar-color) are used by the already-existing scrollbar-auto/thin/none and scrollbar-thumb/track utilities but are absent from this file. While that's a pre-existing gap, touching this file is a good opportunity to add them for consistent sort ordering across all scrollbar utilities.

Suggested change
'scrollbar-gutter',
'list-style-position',
'scrollbar-gutter',
'scrollbar-width',
'scrollbar-color',
'list-style-position',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added a separate PR for this: #20019

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5103eeee-779d-4c62-848d-5e55cc0a4e4b

📥 Commits

Reviewing files that changed from the base of the PR and between aa9a310 and d2225f1.

⛔ Files ignored due to path filters (1)
  • packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (6)
  • CHANGELOG.md
  • packages/tailwindcss/src/compat/config.test.ts
  • packages/tailwindcss/src/compat/plugin-api.test.ts
  • packages/tailwindcss/src/property-order.ts
  • packages/tailwindcss/src/utilities.test.ts
  • packages/tailwindcss/src/utilities.ts
✅ Files skipped from review due to trivial changes (3)
  • packages/tailwindcss/src/compat/config.test.ts
  • packages/tailwindcss/src/property-order.ts
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/tailwindcss/src/utilities.ts
  • packages/tailwindcss/src/utilities.test.ts

Walkthrough

This PR adds support for the CSS scrollbar-gutter property to Tailwind CSS. Three new utility variants—scrollbar-gutter-auto, scrollbar-gutter-stable, and scrollbar-gutter-both—are introduced within the existing enableScrollbarUtilities feature flag. The property is inserted into the CSS property ordering configuration after scroll padding properties. A comprehensive test suite validates that all variants generate correct CSS output and that invalid variant forms are properly rejected.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding scrollbar-gutter utility classes to Tailwind CSS.
Description check ✅ Passed The description directly relates to the changeset by documenting the three new scrollbar-gutter utility classes and their CSS mappings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

…20019)

This PR adds the `scrollbar-width` and `scrollbar-color` properties to
the property order list such that we have a stable sort order for these
properties.

I put `scrollbar-width` before `scrollbar-color`, which is the same
order as the `border-width` and `border-color` properties.

## Test plan

1. Had to update a test because of the swapped order
2. All other tests pass
@RobinMalfait RobinMalfait force-pushed the feat/add-scrollbar-gutter branch from aa9a310 to d2225f1 Compare May 8, 2026 14:53
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.

1 participant