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(fab): Add feature targeting for styles #4526

Merged
merged 4 commits into from Mar 22, 2019

Conversation

kfranqueiro
Copy link
Contributor

Refs #4227.

There are CSS diffs due to reordering, but the same styles should still be present.

cc @mmalerba

@mdc-web-bot
Copy link
Collaborator

All 630 screenshot tests passed for commit 68cb08e vs. master! 💯🎉

} @else {
@include mdc-fab-ink-color(text-primary-on-light);
@include mdc-states(text-primary-on-light);
@include mdc-feature-targets($feat-color) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can remove this one since you're passing the query through below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point... I had originally forgotten to forward the query through the includes below, and then forgot about the include here.

...Meanwhile, now I'm spooked because this somehow didn't fail building? Seems like it should have...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah that is strange, I can see how the feature-targeting test would miss it. We gave it a query that selects nothing, so it fails the first feature-targets check and Sass doesn't bother evaluating what's inside.

But is this getting built as part of the dev app?

@include mdc-fab-accessible($material-color-light-green-800);
I would have expected that to result in an error

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh actually it did fail when I checked out your PR, reverted the fix commit and tried to npm run dev. Got the following error:

ERROR in ./demos/fab.scss
    Module build failed: 
        @error "mdc-feature-targets must not be used inside of another mdc-feature-targets block";

I guess maybe this isn't built as part of your CI?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I made a PR (#4528) to run all the test mixins twice, once with none of the features and once with all of them. In the all of them case, we don't need to do anything with the output, just make sure that it compiles. I think this would have caught your issue here

@mdc-web-bot
Copy link
Collaborator

All 630 screenshot tests passed for commit 1e89a55 vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 630 screenshot tests passed for commit 33dd8ab vs. master! 💯🎉

Copy link
Contributor

@abhiomkar abhiomkar left a comment

Choose a reason for hiding this comment

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

LGTM.

@mdc-web-bot
Copy link
Collaborator

All 630 screenshot tests passed for commit 54e4966 vs. master! 💯🎉

@kfranqueiro kfranqueiro merged commit 1ba7bdd into master Mar 22, 2019
@kfranqueiro kfranqueiro deleted the feat/fab-feature-targeting branch March 22, 2019 00:28
adrianschmidt pushed a commit to Lundalogik/material-components-web that referenced this pull request Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants