diff options
| author | Mark Otto <[email protected]> | 2013-08-13 10:31:29 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-08-13 10:31:29 -0700 |
| commit | d4b14cbf442140d1462200e5f5c8ea2faeac5332 (patch) | |
| tree | 556d2102e0fca065da8d830a923adb3d219df5f0 /less | |
| parent | 99312d2d8302244fa1bf7c6fa41076bc799f458f (diff) | |
| parent | 69a3e9b4d07cdaa281525c067f11ea83e1863f1b (diff) | |
| download | bootstrap-d4b14cbf442140d1462200e5f5c8ea2faeac5332.tar.xz bootstrap-d4b14cbf442140d1462200e5f5c8ea2faeac5332.zip | |
Merge pull request #9424 from twbs/bs3_btn_groups
BS3: `.btn-group`s for your `.btn-group`s
Diffstat (limited to 'less')
| -rw-r--r-- | less/button-groups.less | 58 |
1 files changed, 46 insertions, 12 deletions
diff --git a/less/button-groups.less b/less/button-groups.less index 28cb90fc1..adaad3f80 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -55,11 +55,13 @@ } // Prevent double borders when buttons are next to each other -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; +.btn-group { + .btn + .btn, + .btn + .btn-group, + .btn-group + .btn, + .btn-group + .btn-group { + margin-left: -1px; + } } // Optional: Group multiple button groups together for a toolbar @@ -166,26 +168,58 @@ // Vertical button groups // ---------------------- -.btn-group-vertical > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; - + .btn { +.btn-group-vertical { + > .btn, + > .btn-group { + display: block; + float: none; + width: 100%; + max-width: 100%; + } + + // Clear floats so dropdown menus can be properly placed + > .btn-group { + .clearfix(); + > .btn { + float: none; + } + } + + > .btn + .btn, + > .btn + .btn-group, + > .btn-group + .btn, + > .btn-group + .btn-group { margin-top: -1px; + margin-left: 0; } } -.btn-group-vertical .btn { + +.btn-group-vertical > .btn { &:not(:first-child):not(:last-child) { border-radius: 0; } &:first-child:not(:last-child) { + border-top-right-radius: @border-radius-base; .border-bottom-radius(0); } &:last-child:not(:first-child) { + border-bottom-left-radius: @border-radius-base; .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 { + > .btn:last-child, + > .dropdown-toggle { + .border-bottom-radius(0); + } +} +.btn-group-vertical > .btn-group:last-child > .btn:first-child { + .border-top-radius(0); +} + // Justified button groups |
