Skip to content

Commit

Permalink
(less) Fixes twbs#10921: Add support for input groups within button t…
Browse files Browse the repository at this point in the history
…oolbars

* Floats any `.input-group` within a toolbar
* Simplifies the CSS to remove sibling selectors and instead use a
negative amrgin on the parent with only `margin-left`

See it in action: http://jsbin.com/aGEcUqAT/1/.
  • Loading branch information
mdo committed Dec 15, 2013
1 parent 3abf296 commit 5a23ac1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions button-groups.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,17 @@

// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
margin-left: -5px; // Offset the first child's margin
&:extend(.clearfix all);

.btn-group {
.btn-group,
.input-group {
float: left;
}
// Space out series of button groups
> .btn,
> .btn-group {
+ .btn,
+ .btn-group {
margin-left: 5px;
}
> .btn-group,
> .input-group {
margin-left: 5px;
}
}

Expand Down

0 comments on commit 5a23ac1

Please sign in to comment.