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(list): add feature targeting for styles #4303

Merged

Conversation

crisbeto
Copy link
Collaborator

@crisbeto crisbeto commented Jan 27, 2019

Sets up feature targeting for mdc-list.

Here's the before and after output:
before.css.txt
after.css.txt

Some notes:

  • There are a couple of differences where some rules swapped places which don't seem to be an issue, based on a screenshot diff of the demo page before and after.
  • There are some differences where I found two rules with identical styles that could be combined into one.
  • There are a bunch of tiny rules (1-2 lines of styles each) that could technically be put under one feature target. I decided not to, because the mixin is getting pretty large and it would make things harder to follow.

@crisbeto crisbeto force-pushed the list-feature-targeting branch 2 times, most recently from 605e933 to fa3f61f Compare January 27, 2019 10:14
@crisbeto
Copy link
Collaborator Author

@kfranqueiro I've addressed the feedback. Note that I didn't move the styles from mdc-typography-overflow-ellipsis, mdc-typography-baseline-top and mdc-typography-baseline-bottom under the typography target, because the styles themselves seem more structural (margin, overflow, vertical-align etc.).

@include mdc-typography-overflow-ellipsis($query);
@include mdc-typography-baseline-top($item-primary-text-baseline-height, $query);
@include mdc-typography-baseline-bottom($item-secondary-text-baseline-height, $query);
@include mdc-typography-baseline-top($dense-item-primary-text-baseline-height, $query);
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is in the wrong place. This belongs inside .mdc-list--dense & { below.

packages/mdc-list/_mixins.scss Outdated Show resolved Hide resolved
packages/mdc-list/_mixins.scss Show resolved Hide resolved
packages/mdc-list/_mixins.scss Show resolved Hide resolved
@crisbeto
Copy link
Collaborator Author

crisbeto commented Feb 2, 2019

@kfranqueiro I've addressed the latest set of feedback.

@kfranqueiro
Copy link
Contributor

@kfranqueiro kfranqueiro merged commit c994156 into material-components:master Feb 4, 2019
@jamesmfriedman jamesmfriedman mentioned this pull request Feb 5, 2019
24 tasks
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.

4 participants