mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Fixes #10921: Add support for input groups within button toolbars
* 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/.
This commit is contained in:
parent
fd4130534f
commit
544b8ecab7
3 changed files with 15 additions and 13 deletions
13
dist/css/bootstrap.css
vendored
13
dist/css/bootstrap.css
vendored
|
@ -3045,13 +3045,16 @@ input[type="button"].btn-block {
|
||||||
.btn-group .btn-group + .btn-group {
|
.btn-group .btn-group + .btn-group {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
}
|
}
|
||||||
.btn-toolbar .btn-group {
|
.btn-toolbar {
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
.btn-toolbar .btn-group,
|
||||||
|
.btn-toolbar .input-group {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.btn-toolbar > .btn + .btn,
|
.btn-toolbar > .btn,
|
||||||
.btn-toolbar > .btn-group + .btn,
|
.btn-toolbar > .btn-group,
|
||||||
.btn-toolbar > .btn + .btn-group,
|
.btn-toolbar > .input-group {
|
||||||
.btn-toolbar > .btn-group + .btn-group {
|
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
||||||
|
|
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -37,18 +37,17 @@
|
||||||
|
|
||||||
// Optional: Group multiple button groups together for a toolbar
|
// Optional: Group multiple button groups together for a toolbar
|
||||||
.btn-toolbar {
|
.btn-toolbar {
|
||||||
|
margin-left: -5px; // Offset the first child's margin
|
||||||
&:extend(.clearfix all);
|
&:extend(.clearfix all);
|
||||||
|
|
||||||
.btn-group {
|
.btn-group,
|
||||||
|
.input-group {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
// Space out series of button groups
|
|
||||||
> .btn,
|
> .btn,
|
||||||
> .btn-group {
|
> .btn-group,
|
||||||
+ .btn,
|
> .input-group {
|
||||||
+ .btn-group {
|
margin-left: 5px;
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue