diff options
| author | Mark Otto <[email protected]> | 2016-12-26 22:12:18 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-12-28 15:12:04 -0800 |
| commit | 62c4cb29fbd1d1b9fc788a428d15fc96ea9cd207 (patch) | |
| tree | fe7fba918792c1d0a6182b91e8eccc1b0406b141 | |
| parent | 79cfc095df236e21464882d3dfad67e0c829dabf (diff) | |
| download | bootstrap-62c4cb29fbd1d1b9fc788a428d15fc96ea9cd207.tar.xz bootstrap-62c4cb29fbd1d1b9fc788a428d15fc96ea9cd207.zip | |
redo outlines
- 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
| -rw-r--r-- | scss/_buttons.scss | 10 | ||||
| -rw-r--r-- | scss/mixins/_buttons.scss | 5 |
2 files changed, 5 insertions, 10 deletions
diff --git a/scss/_buttons.scss b/scss/_buttons.scss index 6b924a5c6..2167f22c6 100644 --- a/scss/_buttons.scss +++ b/scss/_buttons.scss @@ -17,17 +17,14 @@ @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); } } diff --git a/scss/mixins/_buttons.scss b/scss/mixins/_buttons.scss index 8e0c4936b..51bf93937 100644 --- a/scss/mixins/_buttons.scss +++ b/scss/mixins/_buttons.scss @@ -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, |
