diff options
| author | Mark Otto <[email protected]> | 2013-08-13 13:48:33 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-08-13 13:48:33 -0700 |
| commit | bd93ed2cb6034de2f287f7508b4fd0b1d28ab0d3 (patch) | |
| tree | 2a59b9815cb02226a694c345cf942c9ad869810f /less/button-groups.less | |
| parent | 3c772b1cebfed73570247691917b40fcf3d95aa2 (diff) | |
| parent | a8769b8cab1799168b31f1a5afd403f323a6b6d4 (diff) | |
| download | bootstrap-bd93ed2cb6034de2f287f7508b4fd0b1d28ab0d3.tar.xz bootstrap-bd93ed2cb6034de2f287f7508b4fd0b1d28ab0d3.zip | |
Merge branch '3.0.0-wip' into bs3_navbar_overhaul
Conflicts:
dist/css/bootstrap.min.css
Diffstat (limited to 'less/button-groups.less')
| -rw-r--r-- | less/button-groups.less | 55 |
1 files changed, 46 insertions, 9 deletions
diff --git a/less/button-groups.less b/less/button-groups.less index d9c91252b..adaad3f80 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -55,8 +55,13 @@ } // Prevent double borders when buttons are next to each other -.btn-group .btn + .btn { - 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 @@ -163,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 |
