assets/stylesheets/bootstrap/_button-group.scss in bootstrap-4.0.0.beta vs assets/stylesheets/bootstrap/_button-group.scss in bootstrap-4.0.0.beta2

- old
+ new

@@ -1,6 +1,6 @@ -// scss-lint:disable QualifyingElement +// stylelint-disable selector-no-qualifying-type // Make the div behave like a button .btn-group, .btn-group-vertical { position: relative; @@ -8,11 +8,10 @@ vertical-align: middle; // match .btn alignment given font-size hack above > .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 @include hover { z-index: 2; @@ -46,37 +45,43 @@ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } -// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match +// Set corners individual because sometimes a single button can be in a .btn-group +// and we need :first-child and :last-child to both match .btn-group > .btn:first-child { margin-left: 0; &:not(:last-child):not(.dropdown-toggle) { @include border-right-radius(0); } } -// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it +// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu +// immediately after it .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { @include border-left-radius(0); } -// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) +// Custom edits for including btn-groups within btn-groups (useful for including +// dropdown buttons within a btn-group) .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); } @@ -127,11 +132,10 @@ // // Vertical button groups // .btn-group-vertical { - display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; .btn, @@ -144,33 +148,38 @@ > .btn-group + .btn, > .btn-group + .btn-group { margin-top: -$input-btn-border-width; margin-left: 0; } -} -.btn-group-vertical > .btn { - &:not(:first-child):not(:last-child) { + > .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:not(:first-child):not(:last-child) > .btn { border-radius: 0; } - &:first-child:not(:last-child) { - @include border-bottom-radius(0); + + > .btn-group:first-child:not(:last-child) { + > .btn:last-child, + > .dropdown-toggle { + @include border-bottom-radius(0); + } } - &:last-child:not(:first-child) { + + > .btn-group:last-child:not(:first-child) > .btn: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-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - @include border-top-radius(0); } // Checkbox and radio options //