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

Fixed a bug with EuiButtonEmpty disabled state #561

Merged
merged 2 commits into from
Mar 22, 2018

Conversation

bevacqua
Copy link
Contributor

Fixed a bug where EuiButtonEmpty would offer a white background on hover when it was disabled, even when there was no such background transition on hover when the buttons are not disabled.

@bevacqua bevacqua requested a review from cchaos March 22, 2018 16:05
@@ -45,8 +45,11 @@
fill: $euiButtonColorDisabled;
}

&:focus {
background-color: transparent;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping this style because I presume it was used to negate https://github.com/elastic/eui/pull/561/files#diff-f844f303cef56a189e1b5e25742bd388L74, but copy pasted from the original buttons, which do have a background color. Here the default background color is transparent, so I'm using that instead.

As a housekeeping item for thought, I'm wondering if some of this should move to variables to make the different button stylesheets similar

Copy link
Contributor

Choose a reason for hiding this comment

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

I would think you'd want it on :hover as well. So maybe just replace the original background-color: $euiColorEmptyShade; with transparent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

background-color: transparent; is already in the base class, why would we repeat it for :hover as well? Wouldn't that just make it harder for consumers to change the background color by hand?

@@ -45,8 +45,11 @@
fill: $euiButtonColorDisabled;
}

&:focus {
background-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would think you'd want it on :hover as well. So maybe just replace the original background-color: $euiColorEmptyShade; with transparent?

@@ -75,8 +78,6 @@ $buttonTypes: (
}

&:hover {
background-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't remove it from here. I think we only add the background color on :focus mainly for keyboard users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the background is already white, like on the demo page, there's no noticeable difference at all though?

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

I was just looking at these particular code snippets and not at it as a whole. So you're good.

@bevacqua bevacqua force-pushed the cleanup-disabled-emptybutton branch from 1519637 to 2a7b751 Compare March 22, 2018 17:14
@bevacqua bevacqua merged commit 0bba638 into elastic:master Mar 22, 2018
@bevacqua bevacqua deleted the cleanup-disabled-emptybutton branch March 22, 2018 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants