Skip to content

Commit

Permalink
fixes twbs#5107: make all .btn-group inline-block by default instead …
Browse files Browse the repository at this point in the history
…of just within a .btn-toolbar
  • Loading branch information
mdo committed Sep 12, 2012
1 parent e1deba3 commit 15bb78c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 3 additions & 8 deletions docs/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -3445,10 +3445,13 @@ input[type="submit"].btn.btn-mini {

.btn-group {
position: relative;
display: inline-block;
*display: inline;
*margin-left: .3em;
font-size: 0;
white-space: nowrap;
vertical-align: middle;
*zoom: 1;
}

.btn-group:first-child {
Expand All @@ -3465,14 +3468,6 @@ input[type="submit"].btn.btn-mini {
font-size: 0;
}

.btn-toolbar .btn-group {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */

*zoom: 1;
}

.btn-toolbar .btn + .btn,
.btn-toolbar .btn-group + .btn,
.btn-toolbar .btn + .btn-group {
Expand Down
6 changes: 2 additions & 4 deletions less/button-groups.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Make the div behave like a button
.btn-group {
position: relative;
display: inline-block;
.ie7-inline-block();
font-size: 0; // remove as part 1 of font-size inline-block hack
vertical-align: middle; // match .btn alignment given font-size hack above
white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
Expand All @@ -22,10 +24,6 @@
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 + .btn,
.btn-group + .btn,
.btn + .btn-group {
Expand Down

0 comments on commit 15bb78c

Please sign in to comment.