diff options
author | Mark Otto <markd.otto@gmail.com> | 2017-08-14 00:55:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 00:55:28 +0300 |
commit | cd22eb1da03d5dbc9062ad5c9e75c05429e4bcd0 (patch) | |
tree | 0ce08d97def778c8a344eded3a243bea5c9801a6 /scss/_button-group.scss | |
parent | bb0cab9f10c4716e01972e9404849deb9f2882ca (diff) |
Button code cleanup (#22951)
* use a mixin there
* revamp .btn-link to match default and outline variants
* remove unnecessary properties
Diffstat (limited to 'scss/_button-group.scss')
-rw-r--r-- | scss/_button-group.scss | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/scss/_button-group.scss b/scss/_button-group.scss index 30a14d8833..4063506825 100644 --- a/scss/_button-group.scss +++ b/scss/_button-group.scss @@ -10,7 +10,6 @@ > .btn { position: relative; flex: 0 1 auto; - margin-bottom: 0; // Bring the hover, focused, and "active" buttons to the front to overlay // the borders properly @@ -66,15 +65,18 @@ .btn-group > .btn-group { float: left; } + .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } + .btn-group > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { @include border-right-radius(0); } } + .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { @include border-left-radius(0); } @@ -129,7 +131,6 @@ // .btn-group-vertical { - display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; @@ -146,30 +147,35 @@ margin-top: -$input-btn-border-width; margin-left: 0; } -} -.btn-group-vertical > .btn { - &:not(:first-child):not(:last-child) { - border-radius: 0; + > .btn { + &:not(:first-child):not(:last-child) { + border-radius: 0; + } } + &:first-child:not(:last-child) { @include border-bottom-radius(0); } + &:last-child:not(:first-child) { @include border-top-radius(0); } -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) { - > .btn:last-child, - > .dropdown-toggle { - @include border-bottom-radius(0); + + > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; + } + + > .btn-group:first-child:not(:last-child) { + > .btn:last-child, + > .dropdown-toggle { + @include border-bottom-radius(0); + } + } + + > .btn-group:last-child:not(:first-child) > .btn:first-child { + @include border-top-radius(0); } -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - @include border-top-radius(0); } |