Skip to content

Conversation

andrewseguin
Copy link
Contributor

Removes token-utils.use-tokens mixin, which was used to set global variables for the token prefixes, slots, and fallbacks that were referenced in calls to token-utils.slot.

For each component, this change:

  • directly includes prefixes in token names, e.g. slide-toggle-track-width instead of just track-width
  • defaults get-tokens to use a theme with system fallbacks

Before:

$token-prefix: m2-slide-toggle.$prefix;
$token-slots: m2-slide-toggle.get-token-slots();
$fallbacks: m3-slide-toggle.get-tokens(m3-system.$theme-with-system-vars);

.mdc-switch {
  @include token-utils.use-tokens($token-prefix, $token-slots, $fallbacks) {
    width: token-utils.slot(track-width);
  }
}

After:

$fallbacks: m3-slide-toggle.get-tokens();

.mdc-switch {
  width: token-utils.slot(slide-toggle-track-width, $fallbacks);
}

@andrewseguin andrewseguin requested review from a team as code owners May 19, 2025 19:33
@andrewseguin andrewseguin requested review from ok7sai and wagnermaciel and removed request for a team May 19, 2025 19:33
@andrewseguin andrewseguin added the target: rc This PR is targeted for the next release-candidate label May 19, 2025
@andrewseguin andrewseguin requested review from crisbeto and mmalerba May 19, 2025 19:34
@devversion devversion removed the request for review from a team May 20, 2025 11:10
@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label May 21, 2025
@andrewseguin andrewseguin merged commit 7b5d88b into angular:main May 21, 2025
23 of 25 checks passed
@andrewseguin
Copy link
Contributor Author

The changes were merged into the following branches: main, 20.0.x

andrewseguin added a commit that referenced this pull request May 21, 2025
* refactor: simplify component styles by removing use-tokens

* refactor: fixes found from internal changes

* refactor: fixes found from internal changes

* refactor: fixes found from internal changes

* refactor: more fixes

(cherry picked from commit 7b5d88b)
@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 Jun 21, 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 target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants