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(button): ripple color not correct for standard, icon and stroked buttons #13235

Merged

Conversation

devversion
Copy link
Member

With c3a8d0c, we already ensured that the text color is inherited in order to make sure that buttons without a background color are readable on various themed backgrounds (e.g. themed toolbars)

This is a follow-up that ensures that the ripple color for such transparent buttons is contrasting to the background color (e.g. in themed toolbars).

Fixes #13232

@devversion devversion added the target: patch This PR is targeted for the next patch release label Sep 21, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 21, 2018
@devversion
Copy link
Member Author

devversion commented Sep 21, 2018

I just realize that there is something that won't work like before. If a developer has a button and sets a custom color for the button, the ripple color will also be based on that custom color (which doesn't look bad; just breaking). Before this change, the ripple color was just kept black.

Not sure what's the best solution here. We can also just change the ripple color of transparent buttons inside of the toolbar theme. This would work, but isn't a solution for other themed elements.

@jelbourn
Copy link
Member

Does this match what mdc does?

@devversion
Copy link
Member Author

devversion commented Sep 21, 2018

By looking at it, it looks like they do nothing about buttons inside a toolbar. They have some special CSS class for icon buttons, but otherwise normal buttons are just invisible inside of the toolbar.

https://stackblitz.com/edit/mdc-js-demo

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker blocked This issue is blocked by some external factor, such as a prerequisite PR and removed action: merge The PR is ready for merge by the caretaker labels Sep 21, 2018
@jelbourn
Copy link
Member

Actually, this is blocked until we finish the 2018 spec updates inside google.

@mhebrard
Copy link

FYI I notice a similar problem on chips:
on selection, the background color change, but the ripple is always black
(do not follow the contract color from the theme)

@devversion
Copy link
Member Author

@mhebrard Yeah, there is already a fix pending for this issue. #13271

@jelbourn jelbourn removed blocked This issue is blocked by some external factor, such as a prerequisite PR labels Nov 2, 2018
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Nov 3, 2018
…buttons

With angular@c3a8d0c, we already ensured that the text color is **inherited** in order to make sure that buttons without a background color are readable on various themed backgrounds (e.g. themed toolbars)

This is a follow-up that ensures that the ripple color for such transparent buttons is contrasting to the background color (e.g. in themed toolbars).

Fixes angular#13232
@devversion devversion force-pushed the fix/button-ripple-color-inherit branch from aaa9c19 to 9008a6f Compare November 8, 2018 07:47
@vivian-hu-zz vivian-hu-zz merged commit b104e75 into angular:master Nov 8, 2018
vivian-hu-zz pushed a commit that referenced this pull request Nov 12, 2018
…buttons (#13235)

With c3a8d0c, we already ensured that the text color is **inherited** in order to make sure that buttons without a background color are readable on various themed backgrounds (e.g. themed toolbars)

This is a follow-up that ensures that the ripple color for such transparent buttons is contrasting to the background color (e.g. in themed toolbars).

Fixes #13232
@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 10, 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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

icon-button ripple color problem
6 participants