From 1d4d9f8d8941f006e81e95549bee991753a75e6e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 18 Sep 2018 02:10:07 +0300 Subject: [PATCH] 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. --- scss/_button-group.scss | 4 +- scss/_buttons.scss | 4 +- scss/_card.scss | 2 +- scss/_carousel.scss | 3 +- scss/_close.scss | 5 ++- scss/_dropdown.scss | 3 +- scss/_list-group.scss | 3 +- scss/_mixins.scss | 1 - scss/_nav.scss | 6 ++- scss/_navbar.scss | 35 ++++++++++-------- scss/_reboot.scss | 12 ++---- scss/_tables.scss | 4 +- scss/_variables.scss | 1 - scss/mixins/_buttons.scss | 4 +- scss/mixins/_hover.scss | 37 ------------------- scss/mixins/_list-group.scss | 3 +- scss/mixins/_table-row.scss | 2 +- scss/mixins/_text-emphasis.scss | 3 +- site/content/docs/4.3/migration.md | 1 + site/static/docs/4.3/assets/scss/_skippy.scss | 2 +- 20 files changed, 51 insertions(+), 84 deletions(-) delete mode 100644 scss/mixins/_hover.scss diff --git a/scss/_button-group.scss b/scss/_button-group.scss index d7220029ad..e486d469d9 100644 --- a/scss/_button-group.scss +++ b/scss/_button-group.scss @@ -13,9 +13,7 @@ // Bring the hover, focused, and "active" buttons to the front to overlay // the borders properly - @include hover { - z-index: 1; - } + &:hover, &:focus, &:active, &.active { diff --git a/scss/_buttons.scss b/scss/_buttons.scss index 5a684a3ff0..2adce28b47 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -17,7 +17,7 @@ @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius); @include transition($btn-transition); - @include hover { + &:hover { color: $body-color; text-decoration: none; } @@ -79,7 +79,7 @@ fieldset:disabled a.btn { color: $btn-link-color; text-decoration: $link-decoration; - @include hover { + &:hover { color: $btn-link-hover-color; text-decoration: $link-hover-decoration; } diff --git a/scss/_card.scss b/scss/_card.scss index c0b2078c1c..5deefeeed6 100644 --- a/scss/_card.scss +++ b/scss/_card.scss @@ -53,7 +53,7 @@ } .card-link { - @include hover { + &:hover { text-decoration: none; } diff --git a/scss/_carousel.scss b/scss/_carousel.scss index 20ea04baf4..0635a4acd5 100644 --- a/scss/_carousel.scss +++ b/scss/_carousel.scss @@ -101,7 +101,8 @@ @include transition($carousel-control-transition); // Hover/focus state - @include hover-focus { + &:hover, + &:focus { color: $carousel-control-color; text-decoration: none; outline: 0; diff --git a/scss/_close.scss b/scss/_close.scss index 5cc96f573e..4f92022c87 100644 --- a/scss/_close.scss +++ b/scss/_close.scss @@ -8,13 +8,14 @@ opacity: .5; // Override 's hover style - @include hover { + &:hover { color: $close-color; text-decoration: none; } &:not(:disabled):not(.disabled) { - @include hover-focus { + &:hover, + &:focus { opacity: .75; } } diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss index ba8674e929..3f46641541 100644 --- a/scss/_dropdown.scss +++ b/scss/_dropdown.scss @@ -143,7 +143,8 @@ } } - @include hover-focus { + &:hover, + &:focus { color: $dropdown-link-hover-color; text-decoration: none; @include gradient-bg($dropdown-link-hover-bg); diff --git a/scss/_list-group.scss b/scss/_list-group.scss index 3f80687ab4..71edfb2d34 100644 --- a/scss/_list-group.scss +++ b/scss/_list-group.scss @@ -23,7 +23,8 @@ text-align: inherit; // For `