Repository navigation
A fix release. It changes how scoped component tokens apply when included inside another selector, makes the spacing and sizing registrations work inside selectors, lets runtime surface overrides reach components in legacy palettes, and makes $scales family maps and the fit_color_scale MCP tool work as documented. It also warns when a deprecated Sass API is used.
Themes
Scoped tokens inside another selector
tokens($theme, $mode: 'scoped') included inside a selector no longer declares the component's tokens on that selector. The tokens go on the component inside it, and on the selector itself only when it is the component:
.promo {
@include tokens(tooltip-theme($background: red), $mode: 'scoped', $scope: '.igx-tooltip');
}
// 30.0.0
.promo, .promo .igx-tooltip { --background: red; … }
// 30.1.0
.promo .igx-tooltip, .promo:where(.igx-tooltip) { --background: red; … }Before, every element inside .promo inherited the tooltip's generic tokens (--background, --foreground, …), so for example every grid toolbar in the section turned red. A class placed on the component itself (<igx-avatar class="vip">) still gets the tokens. :where() keeps its specificity unchanged, so a later .vip { --background: … } rule still wins. A theme map without a selector and with no $scope still targets the parent (&). (IgniteUI/igniteui-angular#17901)
To restyle a component for a whole section, use the default global mode. .promo { @include tokens(tooltip-theme(…)); } declares only --ig-tooltip-* tokens, which no other component reads.
Derived grid inputs
The grid, grid toolbar, paginator, column actions, Excel-style filtering and query builder schemas now declare the background, foreground and accent-color inputs their theme functions accept, with the value initial. These components no longer pick up a generic --background, --foreground or --accent-color declared on an ancestor or on :root.
Spacing and sizing
spacing()andsizing()emit their@propertyrules (--ig-spacing,--ig-size-small|medium|large) at the stylesheet root. When these mixins were included inside a selector or a media query, the rules were nested and the browser dropped them. (#652)- The
pad()function and thesizable()mixin fall back to the initial values (--ig-spacing: 1,--ig-size-medium: 2) when the properties aren't registered.
Tabs
When $tab-ripple-color isn't passed, tabs-theme() now derives it from $item-active-background / $item-background with adaptive-contrast() instead of text-contrast(). Before, when the background was a CSS variable, text-contrast() returned the background itself, so the ripple was the same color as the tab.
Palettes
- Legacy surfaces follow
--ig-surface-500at runtime. In palettes built with thelegacygenerator, which includes all the built-in palettes,--ig-surface-baseis nowvar(--ig-surface-500)instead of a copy of its value. Overriding--ig-surface-500at runtime reaches components again. The compiled colors are the same. Fitted palettes are unchanged; there,--ig-surface-500already points to--ig-surface-base. $scalesmaps keyed by family now reachpalette(). (#634)- A top-level
(anchor: …)is read as one spec for every family. Each family keeps its default range and curve. - A spec without a
rangetakes the family's default range, and also its default curve unless the spec sets one. Arangewithout acurveis still a straight line. - An unquoted
whiteis accepted as ananchor. A color such as#fffis still rejected, with an error that says to quote the keyword. palette()warns about$scaleskeys it ignores: unknown family names, asurfacekey, and extra keys next torange/curve/anchorin a single spec.palette()warns once that thelegacygenerator ignores$scales.
- A top-level
Deprecations
The following APIs now print a deprecation warning, once per compilation:
| API | Use instead |
|---|---|
css-vars($theme) |
tokens($theme) |
text-contrast() |
adaptive-contrast() |
to-opaque() |
CSS color-mix() |
to-hsl() |
Nothing. It will be removed in a future release. |
The library itself no longer calls any of them, and all the SassDoc examples use tokens().
MCP server
fit_color_scaletakes afamilyparameter that sets the key of the returned$scalesmap.nameis now only a label. Iffamilyis omitted andnameis a family name, in any case, it still sets the key. The tool explains the grayanchorand links the scales guidance by itstheming://URI.- Scales schema: family maps are no longer reduced to an empty spec, so per-family scales reach the generated Sass. Unknown family keys, a
surfacekey, and single specs mixed with family keys are rejected, each with its own message at the right path. - Web Components theme template now matches the library (#639):
- The progress counters are registered as
<number>, so fractional progress labels work. - Sizes are registered with
sizing()instead of being set as plain variables. - Adds the tile manager view transitions and the
.ig-scrollbarutility class. The scrollbar variables are emitted for custom palettes too, and the Indigo track uses gray 200. - The
@propertyrules, tile manager transitions and.ig-scrollbarsit outside the generatedtheme()mixin, so including that mixin under a selector doesn't scope them. - The React and Blazor examples are generated from the same template. This fixes the dark examples, which referenced undefined variables.
- The progress counters are registered as
Dependencies
zodis upgraded from 3 to 4 (runtime dependency). In the generated TypeScript types for the JSON palettes, shade maps are nowPartial<Record<Shade, string>>. Shade maps never required every key, and the type now says so.happy-dom21 (preview, dev only),actions/setup-nodeand transitive security updates (body-parser,fast-uri,qs).