-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/schematics): combine style resets #32496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
crisbeto
merged 1 commit into
angular:main
from
crisbeto:32495/custom-theme-style-resets
Dec 10, 2025
Merged
fix(material/schematics): combine style resets #32496
crisbeto
merged 1 commit into
angular:main
from
crisbeto:32495/custom-theme-style-resets
Dec 10, 2025
+31
−93
Conversation
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
6061ea0 to
38f4e4f
Compare
tjshiu
reviewed
Dec 9, 2025
tjshiu
reviewed
Dec 9, 2025
| @@ -6,9 +6,9 @@ | |||
| * found in the LICENSE file at https://angular.dev/license | |||
| */ | |||
|
|
|||
| /** Create custom theme for the given application configuration. */ | |||
| export function createCustomTheme(userPaletteChoice: string): string { | |||
| const colorPalettes = new Map<string, {primary: string; tertiary: string}>([ | |||
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we wanna keep these types ? I don't understand why remove them?
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TS can easily infer them from the constructor so we don't need to specify them.
Prior to angular#31522 we had two places with style resets, because the user could either use a custom theme or one of the pre-built ones. After the change all themes are "custom" so we don't need the extra branch in the logic. These changes combine the style resets into the theme and remove the wording around "custom" from the code. Fixes angular#32495.
38f4e4f to
b034b11
Compare
andrewseguin
approved these changes
Dec 10, 2025
Member
Author
crisbeto
added a commit
that referenced
this pull request
Dec 10, 2025
Prior to #31522 we had two places with style resets, because the user could either use a custom theme or one of the pre-built ones. After the change all themes are "custom" so we don't need the extra branch in the logic. These changes combine the style resets into the theme and remove the wording around "custom" from the code. Fixes #32495. (cherry picked from commit a364de5)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: merge
The PR is ready for merge by the caretaker
target: patch
This PR is targeted for the next patch release
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.
Prior to #31522 we had two places with style resets, because the user could either use a custom theme or one of the pre-built ones. After the change all themes are "custom" so we don't need the extra branch in the logic.
These changes combine the style resets into the theme and remove the wording around "custom" from the code.
Fixes #32495.