Skip to content

Conversation

andrewseguin
Copy link
Contributor

@andrewseguin andrewseguin commented Jun 14, 2025

Defines M2 theme tokens (CSS vars) inline instead of creating a new selector block

// Theme file:
html {
  @include mat.button-theme($theme);
  @include mat.card-theme($theme);
  @include mat.checkbox-theme($theme);
}

Before, this would have split each component into its own html block:

html {
  // button token CSS variable definitions
}

html {
  // card token CSS variable definitions
}

html {
  // checkbox token CSS variable definitions
}

With this change, these will be grouped together:

html {
  // button token CSS variable definitions
  // card token CSS variable definitions
  // checkbox token CSS variable definitions
}

For some users, this will surface a Sass warning about mixed-decls. This was previously being avoided because the CSS created the variables in subsequent selector blocks, but are now inline.

@andrewseguin andrewseguin added the target: minor This PR is targeted for the next minor release label Jun 14, 2025
@andrewseguin andrewseguin force-pushed the create-tokens-more branch 2 times, most recently from ea0ad82 to 501d977 Compare June 15, 2025 13:20
@andrewseguin andrewseguin marked this pull request as ready for review June 16, 2025 11:26
@andrewseguin andrewseguin requested a review from a team as a code owner June 16, 2025 11:26
@andrewseguin andrewseguin requested review from adolgachev, mmalerba, crisbeto and wagnermaciel and removed request for a team June 16, 2025 11:26
@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Jun 16, 2025
@andrewseguin andrewseguin merged commit e462301 into angular:main Jun 16, 2025
23 of 25 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: material/autocomplete target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants