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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed `EuiToolTip` bug which caused the tooltip to hide when moving the mouse around inside of the trigger element ([#557](https://github.com/elastic/eui/pull/557))
- Added a `buttonColor` prop to `EuiConfirmModal` ([#546](https://github.com/elastic/eui/pull/546))
- Added ‘baseline’ as option to `EuiFlexGroup`'s `alignItems` prop ([#546](https://github.com/elastic/eui/pull/546))
- 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 ([#561](https://github.com/elastic/eui/pull/561))

# [`0.0.33`](https://github.com/elastic/eui/tree/v0.0.33)

Expand Down
7 changes: 4 additions & 3 deletions src/components/button/button_empty/_button_empty.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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?

}

&:hover, &:focus {
background-color: $euiColorEmptyShade;
text-decoration: none;
}
}
Expand Down Expand Up @@ -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?


@if ($name == 'disabled') {
cursor: not-allowed;
}
Expand Down