refactor(scrollbar): use standard scrollbar-color/width, re-declare p… - #17547
Open
simeonoff wants to merge 2 commits into
Open
refactor(scrollbar): use standard scrollbar-color/width, re-declare p…#17547simeonoff wants to merge 2 commits into
simeonoff wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Ignite UI for Angular’s Sass theming to style scrollbars via the standards-based scrollbar-color / scrollbar-width properties (instead of ::-webkit-scrollbar-*), and adjusts derived theme scoping so contextual/derived themes correctly affect scrollbar colors. It also removes a tracked generated grid styles artifact and updates test scripts to ensure component styles are generated before TS compilation.
Changes:
- Refactor scrollbar theming mixins to emit standard scrollbar properties alongside scoped tokens, and update derived themes (grid, query builder, column actions, excel-style filtering) to use the new mixin.
- Replace length-driven
sb-sizebehavior withscrollbar-widthkeyword usage (e.g., settingscrollbar-width: thinwhere needed). - Untrack the generated
grid-base.styles.tsand guard multiple test scripts by runningbuild:styles:componentsfirst; broaden Sass dist path rewriting inscripts/sass.mjs.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/sass.mjs | Broadens cross-package derived-theme path rewriting to drop core/src/core/styles/ consistently. |
| projects/igniteui-angular/query-builder/src/query-builder/themes/_derived.scss | Switches derived scrollbar overrides to @include scrollbar(...) and imports the scrollbar mixin. |
| projects/igniteui-angular/query-builder/src/query-builder/themes/_base.scss | Replaces --sb-size usage with direct scrollbar-width: thin on a specific scroller. |
| projects/igniteui-angular/grids/themes/_derived.scss | Updates grid derived themes to use the new scrollbar mixin for contextual scrollbar colors. |
| projects/igniteui-angular/grids/grid/src/grid-base.styles.ts | Removes a previously tracked auto-generated styles artifact. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/themes/_derived.scss | Updates excel-style filtering derived theme to use the new scrollbar mixin. |
| projects/igniteui-angular/grids/core/src/column-actions/themes/_derived.scss | Updates column actions derived theme to use the new scrollbar mixin. |
| projects/igniteui-angular/core/src/core/styles/components/scrollbar/scrollbar-theme.scss | Refactors scrollbar theming to standard properties and centralizes property emission with token scoping. |
| projects/igniteui-angular/core/src/core/styles/components/scrollbar/scrollbar-component.scss | Removes the old %scrollbar-display extend hook from the component registry mixin. |
| package.json | Prepends npm run build:styles:components to multiple test scripts to ensure generated styles exist before TS builds/tests. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
desig9stein
approved these changes
Aug 28, 2026
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.
Description
Migrates scrollbar theming from the
::-webkit-scrollbar-*pseudo-elements to the standardscrollbar-color/scrollbar-widthproperties, and fixes the contextual theming that broke as a result.The
scrollbar-colorandscrollbar-widthsubstitute theirvar()s on the element that declares them, and descendants inherit the already-resolved value. The old webkit rules were descendant selectors, so each scroller's pseudo-element resolved the tokens against its own originating element.Changes:
scrollbar()now emits the properties alongside the tokens, and the four derived themes call it instead of baretokens(..., $mode: 'scoped').scrollbar-widthreadsvar(--sb-width, auto); it only acceptsauto | thin | none, so the length-basedsb-sizetoken cannot drive it..igx-filter-tree__sectionsetsscrollbar-width: thindirectly.grid-base.styles.ts(already matched by.gitignore:53, but gitignore is inert for tracked files) and guards the 12 test scripts that compile lib TS withnpm run build:styles:components.Motivation / Context
Scrollbars did not adapt to derived themes — the grid's own background/foreground had no influence on its scrollbar colors. Investigation showed two independent faults: the inherited-resolved-value behaviour above, and the leaked
&that dropped the rule.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Theming (scrollbar), Grid, Query Builder, Column Actions, Excel-Style Filtering, build/packaging scripts (
scripts/sass.mjs,package.json)How Has This Been Tested?
Verified against compiled output rather than in a browser:
&, in both light and dark theme files.Test Configuration:
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changesBreaking changes
The standard properties expose only two colors and three width keywords. Of the 14
scrollbar-themetokens, three still have effect —sb-thumb-bg-color,sb-track-bg-color, andsb-sizeonly if remapped tothin/auto/none.These become no-ops:
sb-thumb-bg-color-hover,sb-track-bg-color-hover,sb-thumb-min-height,sb-thumb-border-color,sb-thumb-border-size,sb-thumb-border-radius,sb-track-border-color,sb-track-border-size,sb-corner-bg,sb-corner-border-color,sb-corner-border-size.