]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
redo outlines
authorMark Otto <markdotto@gmail.com>
Tue, 27 Dec 2016 06:12:18 +0000 (22:12 -0800)
committerMark Otto <markd.otto@gmail.com>
Wed, 28 Dec 2016 23:12:04 +0000 (15:12 -0800)
- removes original outline removal (hah)
- replaces it with an explicit `outline: 0` on `.btn`
- instead of replicating `:hover` for `:focus`, uses custom and themed `box-shadow` for an "outline"
- not mapped to the `$enable-shadows` variable because accessibility

scss/_buttons.scss
scss/mixins/_buttons.scss

index 6b924a5c6fe83b24ff255852c8c5618ae75af1b2..2167f22c6c0e4308d1ff4108f6a8fb2917383750 100644 (file)
   @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius);
   @include transition($btn-transition);
 
-  &:focus,
-  &.focus {
-    @include tab-focus();
-  }
-
   // Share hover and focus styles
   @include hover-focus {
     text-decoration: none;
   }
+  &:focus,
   &.focus {
-    text-decoration: none;
+    outline: 0;
+    box-shadow: 0 0 0 2px rgba($brand-primary, .25);
   }
 
   // Disabled comes first so active can properly restyle
@@ -41,7 +38,6 @@
   &:active,
   &.active {
     background-image: none;
-    outline: 0;
     @include box-shadow($btn-active-box-shadow);
   }
 }
index 8e0c4936b7a16a465a922fb25fdbecf8292f8841..51bf93937b12c7db31df9ac0ec2f14c814256bc3 100644 (file)
@@ -23,6 +23,7 @@
     color: $color;
     background-color: $active-background;
     border-color: $active-border;
+    box-shadow: 0 0 0 2px rgba($border, .5);
   }
 
   // Disabled comes first so active can properly restyle
@@ -57,9 +58,7 @@
 
   &:focus,
   &.focus {
-    color: $color-hover;
-    background-color: $color;
-    border-color: $color;
+    box-shadow: 0 0 0 2px rgba($color, .5);
   }
 
   &.disabled,