ffc9d555 |
// BUTTON GROUPS
// -------------
// Make the div behave like a button
.btn-group {
position: relative;
.clearfix(); // clears the floated buttons
}
// Space out series of button groups
.btn-group + .btn-group {
margin-left: 5pt;
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
margin-top: @baseLineHeight / 2;
margin-bottom: @baseLineHeight / 2;
.btn-group {
display: inline-block;
}
}
// Float them, remove border radius, then re-add to first and last elements
.btn-group > .btn {
position: relative;
float: left;
margin-left: -1pt;
.border-radius(0);
}
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
|
ffc9d555 |
}
// 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 {
outline: 0;
}
// Split button dropdowns
// ----------------------
// Give the line between buttons some depth
.btn-group > .dropdown-toggle {
padding-left: 8pt;
padding-right: 8pt;
}
.btn-group > .btn-mini.dropdown-toggle {
padding-left: 5pt;
padding-right: 5pt;
}
.btn-group > .btn-large.dropdown-toggle {
padding-left: 12pt;
padding-right: 12pt;
}
.btn-group.open {
// The clickable button for toggling the menu
// Remove the gradient and set the same inset shadow as the :active state
.dropdown-toggle {
background-image: none;
}
// Keep the hover's background when dropdown is open
.btn-primary.dropdown-toggle {
background-color: @btnPrimaryBackgroundHighlight;
}
.btn-warning.dropdown-toggle {
background-color: @btnWarningBackgroundHighlight;
}
.btn-danger.dropdown-toggle {
background-color: @btnDangerBackgroundHighlight;
}
.btn-success.dropdown-toggle {
background-color: @btnSuccessBackgroundHighlight;
}
.btn-info.dropdown-toggle {
background-color: @btnInfoBackgroundHighlight;
}
.btn-inverse.dropdown-toggle {
background-color: @btnInverseBackgroundHighlight;
}
}
// Reposition the caret
.btn .caret {
margin-top: 7pt;
margin-left: 0;
}
.btn:hover .caret,
.open.btn-group .caret {
.opacity(100);
}
// Carets in other button sizes
.btn-mini .caret {
margin-top: 5pt;
}
.btn-small .caret {
margin-top: 6pt;
}
.btn-large .caret {
margin-top: 6pt;
border-left-width: 5pt;
border-right-width: 5pt;
border-top-width: 5pt;
}
// Upside down carets for .dropup
.dropup .btn-large .caret {
border-bottom: 5pt solid @black;
border-top: 0;
}
// Account for other colors
.btn-primary,
.btn-warning,
.btn-danger,
.btn-info,
.btn-success,
.btn-inverse {
.caret {
border-top-color: @white;
border-bottom-color: @white;
.opacity(75);
}
}
|