Repository navigation
feat(themes): add once() and store the design system as theme in palette and type scale meta - #676
Merged
Merged
Conversation
…tte and type scale meta
simeonoff
requested review from
adrianptrv
and
a balanced review from Copilot
November 13, 2026 13:05
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the shared Sass utilities and theme metadata changes.
No open issues 🎉
What changed in this PR
This PR adds shared Sass utilities and theme metadata in preparation for the unified theming API described in #651.
Changes:
- Adds
once()and a test reset helper; sizing and spacing use it to avoid duplicate root-level property registrations. - Adds
thememetadata to palettes and type scales, preserves legacy design-system metadata, and deprecates passing design systems through$variant. - Updates presets and tests for metadata compatibility, deduplication, and nested-scope behavior.
| File | Description |
|---|---|
packages/theming/tests/_utils.spec.scss |
Tests keyed emission, root placement, and reset behavior. |
packages/theming/tests/_typography.spec.scss |
Tests theme metadata in generated and preset type scales. |
packages/theming/tests/_themes.spec.scss |
Tests sizing and spacing registration deduplication. |
packages/theming/tests/_color.spec.scss |
Tests palette metadata and legacy argument compatibility. |
packages/theming/sass/utils/_meta.scss |
Adds once() and its test reset helper. |
packages/theming/sass/typography/_functions.scss |
Adds theme metadata while retaining variant. |
packages/theming/sass/themes/_mixins.scss |
Registers sizing and spacing properties once per compilation. |
packages/theming/sass/color/presets/light/_material.scss |
Passes the design system through $theme. |
packages/theming/sass/color/presets/light/_indigo.scss |
Adds explicit theme metadata. |
packages/theming/sass/color/presets/light/_fluent.scss |
Migrates Fluent, Word, and Excel palettes to $theme. |
packages/theming/sass/color/presets/light/_bootstrap.scss |
Passes the design system through $theme. |
packages/theming/sass/color/presets/dark/_material.scss |
Passes the design system through $theme. |
packages/theming/sass/color/presets/dark/_indigo.scss |
Adds explicit theme metadata. |
packages/theming/sass/color/presets/dark/_fluent.scss |
Migrates Fluent, Word, and Excel palettes to $theme. |
packages/theming/sass/color/presets/dark/_bootstrap.scss |
Passes the design system through $theme. |
packages/theming/sass/color/_types.scss |
Adds theme to the palette metadata shape. |
packages/theming/sass/color/_functions.scss |
Adds $theme and handles deprecated design-system variants. |
Review effort: Balanced
simeonoff
enabled auto-merge
November 13, 2026 13:09
This was referenced Nov 13, 2026
adrianptrv
approved these changes
Nov 16, 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.
Part of #651 (sections 2, 4 and 6).
once($key)emits its content once per compilation and key, at the document root.sizing()andspacing()use it, so calling them again no longer repeats their@propertyrules.palette()takes$theme, and the palette and type scale_metastoretheme.variantstill holds the design system, so existing readers keep working. A design system passed as$variantmoves to$theme, with a deprecation warning.The compiled output doesn't change: the theming build and all Ignite UI for Angular (135) and Web Components (776) stylesheets are byte-identical to master.