1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-29 16:19:53 +02:00

Drop all hover mixins

Previously deprecated in v4.x, this clears out the now unused Sass option and removes some unused mixins. Arguably we could remove more, but I like the hover-focus mixin and we make extensive use of it across the project.
This commit is contained in:
Mark Otto
2018-09-18 02:10:07 +03:00
committed by XhmikosR
parent a827934f13
commit 1d4d9f8d89
20 changed files with 51 additions and 84 deletions

View File

@@ -9,7 +9,7 @@
border-color: $border;
@include box-shadow($btn-box-shadow);
@include hover {
&:hover {
color: color-yiq($hover-background);
@include gradient-bg($hover-background);
border-color: $hover-border;
@@ -65,7 +65,7 @@
color: $color;
border-color: $color;
@include hover {
&:hover {
color: $color-hover;
background-color: $active-background;
border-color: $active-border;

View File

@@ -1,37 +0,0 @@
// Hover mixin and `$enable-hover-media-query` are deprecated.
//
// Originally added during our alphas and maintained during betas, this mixin was
// designed to prevent `:hover` stickiness on iOS-an issue where hover styles
// would persist after initial touch.
//
// For backward compatibility, we've kept these mixins and updated them to
// always return their regular pseudo-classes instead of a shimmed media query.
//
// Issue: https://github.com/twbs/bootstrap/issues/25195
@mixin hover {
&:hover { @content; }
}
@mixin hover-focus {
&:hover,
&:focus {
@content;
}
}
@mixin plain-hover-focus {
&,
&:hover,
&:focus {
@content;
}
}
@mixin hover-focus-active {
&:hover,
&:focus,
&:active {
@content;
}
}

View File

@@ -6,7 +6,8 @@
background-color: $background;
&.list-group-item-action {
@include hover-focus {
&:hover,
&:focus {
color: $color;
background-color: darken($background, 5%);
}

View File

@@ -26,7 +26,7 @@
$hover-background: darken($background, 5%);
.table-#{$state} {
@include hover {
&:hover {
background-color: $hover-background;
> td,

View File

@@ -8,7 +8,8 @@
}
@if $emphasized-link-hover-darken-percentage != 0 {
a#{$parent} {
@include hover-focus {
&:hover,
&:focus {
color: darken($color, $emphasized-link-hover-darken-percentage) !important;
}
}