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(material-experimental/mdc-chips): set correct ripple opacity for … #21624

Merged
merged 2 commits into from
Jan 25, 2021

Conversation

annieyw
Copy link
Contributor

@annieyw annieyw commented Jan 19, 2021

…focus states

Previously the ripple was always set to the focus opacity for selected chips even when not focused.
This is because mdc-chip-fill-color-accessible includes mdc-chip-selected-ink-color which overrides the default ripple opacity so the focus ripple is always visible for selected chips.

The first chip is focused for both images.
Before
Screen Shot 2021-01-19 at 9 29 35 PM

After
Screen Shot 2021-01-19 at 9 28 58 PM

@annieyw annieyw added P2 The issue is important to a large percentage of users, with a workaround G This is is related to a Google internal issue labels Jan 19, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 19, 2021
@annieyw annieyw added the target: patch This PR is targeted for the next patch release label Jan 19, 2021
&:not(:focus) {
.mdc-chip__ripple {
opacity: 0;
}
Copy link
Member

Choose a reason for hiding this comment

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

This increases the specificity a lot and makes it harder to change the opacity to something else, e.g. if we needed a different one on hover. Based on these styles, the element should be transparent by default. Maybe this indicates that there's a different issue someplace else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to including different mixins instead of increasing specificity

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

src/material-experimental/mdc-chips/_chips-theme.scss Outdated Show resolved Hide resolved
@annieyw annieyw added the action: merge The PR is ready for merge by the caretaker label Jan 22, 2021
@andrewseguin andrewseguin merged commit 277ad5b into angular:master Jan 25, 2021
andrewseguin pushed a commit that referenced this pull request Jan 25, 2021
#21624)

* fix(material-experimental/mdc-chips): set correct ripple opacity for focus states

* fix(material-experimental/mdc-chips): extract styles into mixin

(cherry picked from commit 277ad5b)
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Jan 26, 2021
angular#21624)

* fix(material-experimental/mdc-chips): set correct ripple opacity for focus states

* fix(material-experimental/mdc-chips): extract styles into mixin
mmalerba pushed a commit to mmalerba/components that referenced this pull request Jan 29, 2021
angular#21624)

* fix(material-experimental/mdc-chips): set correct ripple opacity for focus states

* fix(material-experimental/mdc-chips): extract styles into mixin
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Feb 8, 2021
angular#21624)

* fix(material-experimental/mdc-chips): set correct ripple opacity for focus states

* fix(material-experimental/mdc-chips): extract styles into mixin
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Feb 8, 2021
angular#21624)

* fix(material-experimental/mdc-chips): set correct ripple opacity for focus states

* fix(material-experimental/mdc-chips): extract styles into mixin
@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 25, 2021
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 G This is is related to a Google internal issue P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants