diff options
| author | Mark Otto <[email protected]> | 2013-02-28 19:34:02 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-02-28 19:34:02 -0800 |
| commit | 9d763e805b3c6a042b8da04cb7a49d2d0748bdd9 (patch) | |
| tree | f5bb158cb867e3ccdb0b5caaa2cd01643621d807 /less/button-groups.less | |
| parent | 877d64dd77fbf43a4376ad44018bf00158a8405a (diff) | |
| download | bootstrap-9d763e805b3c6a042b8da04cb7a49d2d0748bdd9.tar.xz bootstrap-9d763e805b3c6a042b8da04cb7a49d2d0748bdd9.zip | |
Remove margin between buttons in button groups; use border-radius mixins to avoid reseting border-radii that don't need resetting
Diffstat (limited to 'less/button-groups.less')
| -rw-r--r-- | less/button-groups.less | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/less/button-groups.less b/less/button-groups.less index b6c052ca4..a816a1ae1 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -41,32 +41,26 @@ position: relative; border-radius: 0; } -.btn-group > .btn + .btn { - margin-left: 1px; -} + // 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; - border-top-left-radius: @border-radius-base; - border-bottom-left-radius: @border-radius-base; + .border-left-radius(@border-radius-base); } // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { - border-top-right-radius: @border-radius-base; - border-bottom-right-radius: @border-radius-base; + .border-right-radius(@border-radius-base); } // Reset corners for large buttons .btn-group > .btn.large:first-child { margin-left: 0; - border-top-left-radius: @border-radius-large; - border-bottom-left-radius: @border-radius-large; + .border-left-radius(@border-radius-large); } .btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle { - border-top-right-radius: @border-radius-large; - border-bottom-right-radius: @border-radius-large; + .border-right-radius(@border-radius-large); } // On active and open, don't show outline @@ -119,29 +113,23 @@ // Vertical button groups // ---------------------- -.btn-group-vertical { -} .btn-group-vertical > .btn { display: block; float: none; border-radius: 0; max-width: 100%; } -.btn-group-vertical > .btn + .btn { - margin-left: 0; - margin-top: 1px; -} .btn-group-vertical .btn:first-child { - border-radius: @border-radius-base @border-radius-base 0 0; + .border-top-radius(@border-radius-base); } .btn-group-vertical .btn:last-child { - border-radius: 0 0 @border-radius-base @border-radius-base; + .border-bottom-radius(@border-radius-base); } .btn-group-vertical .btn-large:first-child { - border-radius: @border-radius-large @border-radius-large 0 0; + .border-top-radius(@border-radius-large); } .btn-group-vertical .btn-large:last-child { - border-radius: 0 0 @border-radius-large @border-radius-large; + .border-bottom-radius(@border-radius-large); } |
