From e6e0e2ac9b0a31979531b6add3d1c8aaceb65f2e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 18 Aug 2012 16:50:26 -0700 Subject: [PATCH] fixes #4442: allow for .btn within a .btn-toolbar without .btn-group --- docs/assets/css/bootstrap.css | 6 ++++++ less/button-groups.less | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 3af4a79459..82fee6daeb 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3328,6 +3328,7 @@ input[type="submit"].btn.btn-mini { .btn-toolbar { margin-top: 10px; margin-bottom: 10px; + font-size: 0; } .btn-toolbar .btn-group { @@ -3338,6 +3339,11 @@ input[type="submit"].btn.btn-mini { *zoom: 1; } +.btn-toolbar .btn-group + .btn, +.btn-toolbar .btn + .btn-group { + margin-left: 5px; +} + .btn-group > .btn { position: relative; margin-left: -1px; diff --git a/less/button-groups.less b/less/button-groups.less index cbb237a611..1cc758b7f6 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -18,12 +18,17 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { + font-size: 0; // Hack to remove whitespace that results from using inline-block margin-top: @baseLineHeight / 2; margin-bottom: @baseLineHeight / 2; .btn-group { display: inline-block; .ie7-inline-block(); } + .btn-group + .btn, + .btn + .btn-group { + margin-left: 5px; + } } // Float them, remove border radius, then re-add to first and last elements