Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(chips): update to latest Material Design spec (2017) updates #11989

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Jul 31, 2020

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

See the issue for some of the ways that md-chips is out of date with the latest version of the 2017 MD chips spec.

Issue Number:
Fixes #9883

What is the new behavior?

  • use the md-cancel button instead of the md-close button
  • $chip-font-size reduced to 13px from 16px
  • $chip-remove-padding-right increased to 28px from 22px
  • in light mode, remove chip icon should be black w/ 87% opacity
  • update custom remove chip template demo
    • show remove icon on hover/focus only
    • remove unnecessary CSS
    • update to new size guidelines and remove color on hover/focus
    • fix remove chip icon color when chip is focused

Does this PR introduce a breaking change?

[x] Yes
[ ] No

BREAKING CHANGE: Chips have been updated to latest Material Design spec (2017). $chip-font-size was reduced to 13px from 16px. $chip-remove-padding-right was increased to 28px from 22px. These changes may cause your chips to have a smaller, denser layout now. In certain scenarios, this may require minor changes to your app's layout. You can change these variables back to their old values if your app consumes Sass. Additionally, the remove chip icon has been changed, but you can use the custom chip template demo as a guide to changing back to the old icon, if desired.

Other information

Before

Screen Shot 2020-07-30 at 22 40 38
Screen Shot 2020-07-30 at 22 41 36

After

Screen Shot 2020-07-30 at 22 40 20
Screen Shot 2020-07-30 at 22 41 26

@Splaktar Splaktar requested a review from mmalerba July 31, 2020 02:37
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jul 31, 2020
@Splaktar Splaktar self-assigned this Jul 31, 2020
@Splaktar Splaktar added this to the 1.2.0 milestone Jul 31, 2020
@Splaktar Splaktar added P3: important Important issues that really should be fixed when possible. type: spec alignment For issues related to aligning with the Material Design Spec type: bug ui: CSS labels Jul 31, 2020
- use the `md-cancel` button instead of the `md-close` button
- `$chip-font-size` reduced to `13px` from `16px`
- `$chip-remove-padding-right` increased to `28px` from `22px`
- in light mode, remove chip icon should be black w/ 87% opacity
- update custom remove chip template demo
  - show remove icon on hover/focus only
  - remove unnecessary CSS
  - update to new size guidelines and remove color on hover/focus
  - fix remove chip icon color when chip is focused

Fixes #9883

BREAKING CHANGE: Chips have been updated to latest Material Design spec (2017). `$chip-font-size` was reduced to `13px` from `16px`. `$chip-remove-padding-right` was increased to `28px` from `22px`. These changes may cause your chips to have a smaller, denser layout now. In certain scenarios, this may require minor changes to your app's layout. You can change these variables back to their old values if your app consumes Sass. Additionally, the remove chip icon has been changed, but you can use the custom chip template demo as a guide to changing back to the old icon, if desired.
@Splaktar Splaktar force-pushed the chips-spec-update branch from f3d0489 to ece21ca Compare July 31, 2020 18:29
@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Jul 31, 2020
@Splaktar Splaktar merged commit 01351b1 into master Jul 31, 2020
@Splaktar Splaktar deleted the chips-spec-update branch July 31, 2020 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P3: important Important issues that really should be fixed when possible. pr: lgtm This PR has been approved by the reviewer type: bug type: spec alignment For issues related to aligning with the Material Design Spec ui: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chips: are not aligned with updated Material Design specs
3 participants