Skip to content

feat(material-experimental/mdc-radio): switch to new theming API #23640

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

Reworks the MDC-based radio button to use the new theming API based on CSS variables.

Also fixes a minor issue where the high contrast styles were emitting slightly more CSS than they need to.

@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 25, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 25, 2021
@andrewseguin
Copy link
Contributor

Internal tests look good, except that the disabled color seems really faint. Can you double check that the disabled state color matches spec?

.mdc-radio {
// MDC theme styles also include structural styles so we have to include the theme at least
// once here. The values will be overwritten by our own theme file afterwards.
@include mdc-radio-theme.theme-styles(mdc-radio-theme.$light-theme);
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 turn off fallback values going forward, and just tell the theming system to slot the variables?

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 is the mixin that slots the variables. I'd rather keep the fallbacks for now and we can have a separate PR that turns them off for all the components using the new API.

Reworks the MDC-based radio button to use the new theming API based on CSS variables.

Also fixes a minor issue where the high contrast styles were emitting slightly more CSS than they need to.
@crisbeto crisbeto force-pushed the mdc-radio-theme-mixins branch from 5f9855a to 9787132 Compare October 5, 2021 19:04
@crisbeto
Copy link
Member Author

crisbeto commented Oct 5, 2021

I've pushed a fix for the disabled color issue.

Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

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

Tests pass, LGTM

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Oct 7, 2021
@zarend zarend added target: rc This PR is targeted for the next release-candidate target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release target: rc This PR is targeted for the next release-candidate labels Oct 11, 2021
@zarend
Copy link
Contributor

zarend commented Oct 11, 2021

closed in favor of #23725 (which is identical code but changes commit type from feat to fix)

@zarend zarend closed this Oct 11, 2021
@zarend zarend reopened 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 19, 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: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants