aboutsummaryrefslogtreecommitdiff
path: root/less/button-groups.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-06 18:29:54 -0700
committerMark Otto <[email protected]>2013-08-06 18:29:54 -0700
commit402dbfb6171e18aa44e19429e796169f02b0adf7 (patch)
treeaeb0cef7cc1b04988307a0ef79b07fbe2d7d197c /less/button-groups.less
parent7e19b6b02ccd5417a6c2d3d418c08219773f1112 (diff)
parent41bdd1a4823feb8b46b2fccfeec3e9c5057a0665 (diff)
downloadbootstrap-402dbfb6171e18aa44e19429e796169f02b0adf7.tar.xz
bootstrap-402dbfb6171e18aa44e19429e796169f02b0adf7.zip
Merge branch '3.0.0-wip' into bs3_theme
Conflicts: dist/css/bootstrap.min.css
Diffstat (limited to 'less/button-groups.less')
-rw-r--r--less/button-groups.less51
1 files changed, 39 insertions, 12 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index d78815c93..3ae18e92f 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -3,11 +3,32 @@
// --------------------------------------------------
// Button carets
-.btn .caret {
- border-top-color: @btn-default-color;
+//
+// Match the button text color to the arrow/caret for indicating dropdown-ness.
+
+.caret {
+ .btn-default & {
+ border-top-color: @btn-default-color;
+ }
+ .btn-primary &,
+ .btn-success &,
+ .btn-warning &,
+ .btn-danger &,
+ .btn-info & {
+ border-top-color: #fff;
+ }
}
-.dropup .btn .caret {
- border-bottom-color: @btn-default-color;
+.dropup .caret {
+ .btn-default & {
+ border-bottom-color: @btn-default-color;
+ }
+ .btn-primary &,
+ .btn-success &,
+ .btn-warning &,
+ .btn-danger &,
+ .btn-info & {
+ border-bottom-color: #fff;
+ }
}
// Make the div behave like a button
@@ -22,9 +43,14 @@
// Bring the "active" button to the front
&:hover,
&:focus,
- &:active {
+ &:active,
+ &.active {
z-index: 2;
}
+ &:focus {
+ // Remove focus outline when dropdown JS adds it after closing the menu
+ outline: none;
+ }
}
}
@@ -100,7 +126,7 @@
padding-left: 8px;
padding-right: 8px;
}
-.btn-group > .btn-large + .dropdown-toggle {
+.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
@@ -117,12 +143,12 @@
margin-left: 0;
}
// Carets in other button sizes
-.btn-large .caret {
- border-width: 5px;
+.btn-lg .caret {
+ border-width: @caret-width-large;
}
// Upside down carets for .dropup
-.dropup .btn-large .caret {
- border-bottom-width: 5px;
+.dropup .btn-lg .caret {
+ border-bottom-width: @caret-width-large;
}
@@ -142,10 +168,10 @@
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
- &:first-child {
+ &:first-child:not(:last-child) {
.border-bottom-radius(0);
}
- &:last-child {
+ &:last-child:not(:first-child) {
.border-top-radius(0);
}
}
@@ -157,6 +183,7 @@
.btn-group-justified {
display: table;
width: 100%;
+ table-layout: fixed;
.btn {
float: none;
display: table-cell;