aboutsummaryrefslogtreecommitdiff
path: root/less/button-groups.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-12-21 00:50:28 -0800
committerMark Otto <[email protected]>2012-12-21 00:50:28 -0800
commitc11f41ba04791a0c408071527994dfb22c91a436 (patch)
treefdc17547ec028e8a9dcbeb43320eb25f09f17efb /less/button-groups.less
parent7c04d573d0a08a365f3350c9d52d7cc870f702be (diff)
downloadbootstrap-c11f41ba04791a0c408071527994dfb22c91a436.tar.xz
bootstrap-c11f41ba04791a0c408071527994dfb22c91a436.zip
flatten buttons and forms
Diffstat (limited to 'less/button-groups.less')
-rw-r--r--less/button-groups.less42
1 files changed, 13 insertions, 29 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index 04f3e5d72..7113b583c 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -7,24 +7,23 @@
.btn-group {
position: relative;
display: 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)
-}
-
-// Space out series of button groups
-.btn-group + .btn-group {
- margin-left: 5px;
+ > .btn {
+ float: left;
+ }
}
// 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: @line-height-base / 2;
- margin-bottom: @line-height-base / 2;
+ .clearfix();
+ .btn-group {
+ float: left;
+ }
+ // Space out series of button groups
> .btn + .btn,
> .btn-group + .btn,
- > .btn + .btn-group {
+ > .btn + .btn-group,
+ > .btn-group + .btn-group {
margin-left: 5px;
}
}
@@ -35,12 +34,7 @@
border-radius: 0;
}
.btn-group > .btn + .btn {
- margin-left: -1px;
-}
-.btn-group > .btn,
-.btn-group > .dropdown-menu,
-.btn-group > .popover {
- font-size: @font-size-base; // redeclare as part 2 of font-size inline-block hack
+ margin-left: 1px;
}
// Reset fonts for other sizes
@@ -78,14 +72,6 @@
border-bottom-right-radius: @border-radius-large;
}
-// On hover/focus/active, bring the proper btn to front
-.btn-group > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group > .btn:active,
-.btn-group > .btn.active {
- z-index: 2;
-}
-
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
@@ -101,7 +87,6 @@
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
- .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
}
.btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
@@ -118,7 +103,7 @@
// Remove the gradient and set the same inset shadow as the :active state
.dropdown-toggle {
background-image: none;
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
+ .box-shadow(inset 0 2px 4px rgba(0,0,0,.15));
}
// Keep the hover's background when dropdown is open
@@ -184,7 +169,6 @@
// ----------------------
.btn-group-vertical {
- display: inline-block; // Make buttons only take up the width they need
}
.btn-group-vertical > .btn {
display: block;
@@ -194,7 +178,7 @@
}
.btn-group-vertical > .btn + .btn {
margin-left: 0;
- margin-top: -1px;
+ margin-top: 1px;
}
.btn-group-vertical .btn:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;