Skip to content

refactor(material/table): switch to tokens API #27192

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
merged 1 commit into from
Jun 12, 2023

Conversation

crisbeto
Copy link
Member

Reworks the Material table to use the new tokens API.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release labels May 30, 2023
@crisbeto crisbeto force-pushed the table-tokens branch 5 times, most recently from eeee16b to 0cbc94e Compare June 2, 2023 12:47
@crisbeto crisbeto force-pushed the table-tokens branch 3 times, most recently from c3bed15 to 361d616 Compare June 8, 2023 12:55
@crisbeto crisbeto marked this pull request as ready for review June 8, 2023 12:59
@@ -71,12 +71,21 @@ $_component-prefix: null;

// Emits a slot for the given token, provided that it has a non-null value in the token map passed
// to `use-tokens`.
@mixin create-token-slot($property, $token) {
@mixin create-token-slot($property, $token, $emit-fallback: false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we comment that having emit-fallback = true would be for temporary workarounds?

@crisbeto crisbeto self-assigned this Jun 8, 2023
@mmalerba mmalerba self-assigned this Jun 9, 2023
mdc-data-table-theme.$stroke-color: rgba(mdc-theme-color.prop-value(on-surface), 0.12);

@include mdc-data-table.table-styles($query: mdc-helpers.$mdc-theme-styles-query);
@mixin _output-tokens {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can use this function instead: https://github.com/angular/components/blob/main/src/material/core/style/_sass-utils.scss#L11

Also, I'm not sure we need to clean it up, I'd like to move toward emitting the tokens under the user's selector (or document root if they don't specify one)

@mmalerba mmalerba removed their assignment Jun 9, 2023
Reworks the Material table to use the new tokens API.
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 12, 2023
@crisbeto crisbeto merged commit de7c3db into angular:main Jun 12, 2023
@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 13, 2023
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 P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants