Skip to content

Commit

Permalink
Remove hover states on background utilities (#28457)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens authored and XhmikosR committed Mar 14, 2019
1 parent 837ff0c commit a88d586
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
14 changes: 0 additions & 14 deletions scss/mixins/_background-variant.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
// stylelint-disable declaration-no-important

// Contextual backgrounds

@mixin bg-variant($parent, $color) {
#{$parent} {
background-color: $color !important;
}
a#{$parent},
button#{$parent} {
@include hover-focus {
background-color: darken($color, 10%) !important;
}
}
}

@mixin bg-gradient-variant($parent, $color) {
#{$parent} {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
Expand Down
4 changes: 3 additions & 1 deletion scss/utilities/_background.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// stylelint-disable declaration-no-important

@each $color, $value in $theme-colors {
@include bg-variant(".bg-#{$color}", $value);
.bg-#{$color} {
background-color: $value !important;
}
}

@if $enable-gradients {
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/4.3/utilities/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Contextual text classes also work well on anchors with the provided hover and fo

## Background color

Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities.
Similar to the contextual text color classes, easily set the background of an element to any contextual class. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities.

{{< example >}}
{{< colors.inline >}}
Expand Down

0 comments on commit a88d586

Please sign in to comment.