Skip to content
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ project adheres to [Semantic Versioning](http://semver.org).
borders being set on the `tr`s. ([#288])
- The value of `$base-spacing` is no longer derived from `$base-line-height`.
([#292])
- The color of button text is now set using Bourbon's
[`contrast-switch`][contrast-switch] function, to automatically ensure
sufficient contrast against the button's background color. ([#294])

### Removed

Expand All @@ -23,6 +26,8 @@ project adheres to [Semantic Versioning](http://semver.org).
[#285]: https://github.com/thoughtbot/bitters/pull/285
[#288]: https://github.com/thoughtbot/bitters/pull/288
[#292]: https://github.com/thoughtbot/bitters/pull/292
[#294]: https://github.com/thoughtbot/bitters/pull/294
[contrast-switch]: http://bourbon.netlify.com/docs/latest/#contrast-switch

## [1.6.0] - 2017-05-12

Expand Down
13 changes: 8 additions & 5 deletions core/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
$_button-background-color: $action-color;
$_button-background-color-hover: shade($action-color, 20%);

#{$all-buttons} {
appearance: none;
background-color: $action-color;
background-color: $_button-background-color;
border: 0;
border-radius: $base-border-radius;
color: #fff;
color: contrast-switch($_button-background-color);
cursor: pointer;
display: inline-block;
font-family: $base-font-family;
Expand All @@ -20,8 +23,8 @@
white-space: nowrap;

&:hover {
background-color: shade($action-color, 20%);
color: #fff;
background-color: $_button-background-color-hover;
color: contrast-switch($_button-background-color-hover);
}

&:focus {
Expand All @@ -34,7 +37,7 @@
opacity: 0.5;

&:hover {
background-color: $action-color;
background-color: $_button-background-color;
}
}
}