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): hover styles being applied to disabled buttons #909

Merged
merged 1 commit into from
Aug 13, 2016

Conversation

crisbeto
Copy link
Member

Fixes the button hover styles being applied, even if a button is disabled.

Fixes #866.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 23, 2016
// Use the same visual treatment for hover as for focus.
@include md-button-focus();
[md-button], [md-icon-button] {
&:not([disabled]):hover {
Copy link
Member

Choose a reason for hiding this comment

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

I'm hesitant to get so specific with the rule. Can it be done such that the disabled style is defined after the hover style with the same specificity as to override it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, although I think that this adds a little to the selector length, but reduces specificity. It seemed strange that the :after is used to add the background.

@crisbeto crisbeto force-pushed the 866/disabled-button-hover branch 2 times, most recently from 5b6c2cf to 2945e83 Compare July 25, 2016 19:08
@jelbourn
Copy link
Member

jelbourn commented Aug 8, 2016

@crisbeto LGTM if you can rebase

Fixes the button hover styles being applied, even if a button is disabled.

Fixes angular#866.
@crisbeto
Copy link
Member Author

Sorry @jelbourn, I was away last week. It's rebased now.

@jelbourn jelbourn merged commit 21e419d into angular:master Aug 13, 2016
jelbourn pushed a commit to jelbourn/components that referenced this pull request Aug 14, 2016
)

Fixes the button hover styles being applied, even if a button is disabled.

Fixes angular#866.
@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
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.

Hover style still shows on disabled buttons
3 participants