Skip to content
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

feat(material-experimental/mdc-form-field): support theming through feature targeting #18265

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

devversion
Copy link
Member

cc. @crisbeto

We can add support for toggling animations in a follow-up by filtering the animations feature target.

@devversion devversion added the target: patch This PR is targeted for the next patch release label Jan 23, 2020
@devversion devversion requested a review from mmalerba as a code owner January 23, 2020 13:19
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 23, 2020
@devversion devversion force-pushed the feat/mdc-form-field-theming branch from 4f9a9ba to fbf99c2 Compare January 23, 2020 13:23
@@ -0,0 +1,63 @@
@use 'sass:color';
@use '@material/theme/variables' as theme-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.

As mentioned in the meeting. The variable value expressions are basically just copied over from their variables.scss file. I didn't bother updating every function invocation / variable reference to use the old syntax. Since the MDC styles already use @use and @forward anyway, I don't think there is any reason why we can't use it here (and save some work)

// that the ripples are not rendered in the outline appearance, we copy the mixin call but
// increase the specificity.
.mat-mdc-text-field-wrapper.mdc-text-field--outlined {
@include mdc-ripple.states-base-color(transparent);
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 seems to be explicitly filtered out in mixins.import. I don't know why it isn't exposed there. Importing it through mixins.scss works. This matches how MDC text-field imports it, so I don't think it's wrong doing that here too.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn merged commit 27111eb into angular:master Jan 26, 2020
yifange pushed a commit to yifange/components that referenced this pull request Jan 30, 2020
@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 Feb 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants