Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Dec 8, 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.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Dec 8, 2025
@pullapprove pullapprove bot requested review from ok7sai and tjshiu December 8, 2025 08:54
@crisbeto crisbeto requested a review from andrewseguin December 8, 2025 08:55
@crisbeto crisbeto force-pushed the 32495/custom-theme-style-resets branch from 6061ea0 to 38f4e4f Compare December 8, 2025 15:25
@@ -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}>([
Copy link
Contributor

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?

Copy link
Member Author

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.
@crisbeto crisbeto force-pushed the 32495/custom-theme-style-resets branch from 38f4e4f to b034b11 Compare December 9, 2025 08:16
@crisbeto crisbeto removed the request for review from ok7sai December 10, 2025 20:58
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Dec 10, 2025
@crisbeto crisbeto merged commit a364de5 into angular:main Dec 10, 2025
25 checks passed
@crisbeto
Copy link
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(setup): duplicate margin and font-family

3 participants