Skip to content

feat(material-experimental/mdc-tabs): switch to new theming API #23642

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

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

Switches the MDC-based tabs to the new theming API. Note that while this uses the new mixins which clean up some of our overrides, it doesn't get us there completely in regards to the new API. Currently MDC's tabs mixins output the token values directly, rather than generating CSS variables for them. That being said, this still makes it easier to switch to CSS variables once they're available.

These changes also introduce a new structural-styles mixin in tabs-common which centralizes the various structural styles we include from MDC. Previously they were scattered across multiple files.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release labels Sep 26, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 26, 2021
@mixin structural-styles {
@include mdc-tab.without-ripple($query: mdc-helpers.$mat-base-styles-query);
@include mdc-tab-indicator.core-styles($query: mdc-helpers.$mat-base-styles-query);

Copy link
Member Author

Choose a reason for hiding this comment

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

This mixin is somewhat small at the moment, but we'll need to add the theme-styles mixins to it once MDC fixes them.

Switches the MDC-based tabs to the new theming API. Note that while this uses the new mixins which clean up some of our overrides, it doesn't get us there completely in regards to the new API. Currently MDC's tabs mixins output the token values directly, rather than generating CSS variables for them. That being said, this still makes it easier to switch to CSS variables once they're available.

These changes also introduce a new `structural-styles` mixin in `tabs-common` which centralizes the various structural styles we include from MDC. Previously they were scattered across multiple files.
@crisbeto
Copy link
Member Author

crisbeto commented Oct 5, 2021

Feedback has been addressed.

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Oct 7, 2021
@zarend
Copy link
Contributor

zarend commented Oct 11, 2021

Closed in favor of #23642, which has identical code but the commit type is changed from feat to fix.

@zarend zarend closed this Oct 11, 2021
@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 Nov 11, 2021
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 cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants