]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Prevent hover/click on disabled .close links.
authorysds <ysds.code@gmail.com>
Tue, 17 Jul 2018 03:21:43 +0000 (06:21 +0300)
committerMartijn Cuppens <martijn.cuppens@gmail.com>
Tue, 30 Oct 2018 17:25:14 +0000 (18:25 +0100)
scss/_close.scss

index 33ec8234565973b375fb63df69734ec52c5dfa67..821922f4c47348b0ae79f8e15bdeba5e1a8114c2 100644 (file)
@@ -7,11 +7,14 @@
   text-shadow: $close-text-shadow;
   opacity: .5;
 
-  &:not(:disabled):not(.disabled) {
+  // Override <a>'s hover style
+  @include hover {
+    color: $close-color;
+    text-decoration: none;
+  }
 
+  &:not(:disabled):not(.disabled) {
     @include hover-focus {
-      color: $close-color;
-      text-decoration: none;
       opacity: .75;
     }
 
@@ -32,3 +35,10 @@ button.close {
   border: 0;
   appearance: none;
 }
+
+// Future-proof disabling of clicks on `<a>` elements
+
+// stylelint-disable-next-line selector-no-qualifying-type
+a.close.disabled {
+  pointer-events: none;
+}