0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Restore button groups

This commit is contained in:
Mark Otto 2013-01-16 13:04:29 -08:00
parent c18b5b9735
commit ab38493e91
3 changed files with 146 additions and 1 deletions

View File

@ -3352,6 +3352,150 @@ fieldset[disabled] .btn-link:hover {
*/
.caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.btn-group {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group > .btn {
float: left;
}
.btn-toolbar:before,
.btn-toolbar:after {
display: table;
content: " ";
}
.btn-toolbar:after {
clear: both;
}
.btn-toolbar .btn-group {
float: left;
}
.btn-toolbar > .btn + .btn,
.btn-toolbar > .btn-group + .btn,
.btn-toolbar > .btn + .btn-group,
.btn-toolbar > .btn-group + .btn-group {
margin-left: 5px;
}
.btn-group > .btn {
position: relative;
border-radius: 0;
}
.btn-group > .btn + .btn {
margin-left: 1px;
}
.btn-group > .btn:first-child {
margin-left: 0;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
}
.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.btn-group > .btn.large:first-child {
margin-left: 0;
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
}
.btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-right: 8px;
padding-left: 8px;
}
.btn-group > .btn-mini + .dropdown-toggle {
padding-right: 5px;
padding-left: 5px;
}
.btn-group > .btn-large + .dropdown-toggle {
padding-right: 12px;
padding-left: 12px;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn .caret {
margin-top: 8px;
margin-left: 0;
}
.btn-large .caret {
margin-top: 6px;
}
.btn-large .caret {
border-width: 5px;
}
.btn-mini .caret,
.btn-small .caret {
margin-top: 8px;
}
.dropup .btn-large .caret {
border-bottom-width: 5px;
}
.btn-group-vertical > .btn {
display: block;
float: none;
max-width: 100%;
border-radius: 0;
}
.btn-group-vertical > .btn + .btn {
margin-top: 1px;
margin-left: 0;
}
.btn-group-vertical .btn:first-child {
border-radius: 4px 4px 0 0;
}
.btn-group-vertical .btn:last-child {
border-radius: 0 0 4px 4px;
}
.btn-group-vertical .btn-large:first-child {
border-radius: 6px 6px 0 0;
}
.btn-group-vertical .btn-large:last-child {
border-radius: 0 0 6px 6px;
}
@media screen and (min-width: 768px) {
[class^="span"] {
float: left;

1
less/bootstrap.less vendored
View File

@ -33,6 +33,7 @@
// Components: Nav
@import "navs.less";
@import "navbar.less";
@import "button-groups.less";

View File

@ -20,7 +20,7 @@
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
.clearfix();
.clear_float();
.btn-group {
float: left;
}