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

fix(chips): cursor on remove button and box-shadow transition #6019

Merged
merged 1 commit into from
Jul 28, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jul 25, 2017

  • Adds a pointer: cursor to the chip remove button to indicate that it's clickable.
  • Adds a transition to the focused chip box-shadow to make it less harsh.
  • Breaks up a long line that was exceeding our character limit.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 25, 2017
@@ -82,6 +85,7 @@ $mat-chips-chip-margin: 8px;
.mat-chip-remove {
margin-right: $mat-chip-remove-margin-after;
margin-left: $mat-chip-remove-margin-before;
cursor: pointer;
Copy link
Contributor

Choose a reason for hiding this comment

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

I had previously removed it because of this animation https://material.io/guidelines/components/chips.html#chips-behavior, but I certainly understand how pointer helps show purpose

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that example is mostly to show the color change, rather than the cursor.

border-radius: $mat-chip-horizontal-padding * 2;
align-items: center;
cursor: default;
transition: box-shadow $swift-ease-out-duration $swift-ease-out-timing-function;
Copy link
Contributor

Choose a reason for hiding this comment

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

How about mat-elevation-transition()?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah nice, I had forgotten we had that.

display: inline-flex;
padding: $mat-chip-vertical-padding $mat-chip-horizontal-padding $mat-chip-vertical-padding $mat-chip-horizontal-padding;
padding: $mat-chip-vertical-padding $mat-chip-horizontal-padding $mat-chip-vertical-padding
Copy link
Contributor

Choose a reason for hiding this comment

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

here can use padding: $mat-chip-vertical-padding $mat-chip-horizontal-padding instead of 4 values?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Changed.

* Adds a `pointer-cursor` to the chip remove button to indicate that it's clickable.
* Adds a transition to the focused chip `box-shadow` to make it less harsh.
* Breaks up a long line that was exceeding our character limit.
@tinayuangao
Copy link
Contributor

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jul 26, 2017
@andrewseguin andrewseguin merged commit 8253503 into angular:master Jul 28, 2017
@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 Sep 6, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants