// // Input groups // -------------------------------------------------- // Base styles // ------------------------- .input-group { position: relative; // For dropdowns display: table; border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table // Undo padding and float of grid classes &[class*="col-"] { float: none; padding-left: 0; padding-right: 0; } .form-control { // Ensure that the input is always above the *appended* addon button for // proper border colors. position: relative; z-index: 2; // IE9 fubars the placeholder attribute in text inputs and the arrows on // select elements in input groups. To fix it, we float the input. Details: // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 float: left; width: 100%; margin-bottom: 0; &:focus { z-index: 3; } } } // Sizing options // // Remix the default form control sizing classes into new ones for easier // manipulation. .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { .input-lg(); } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { .input-sm(); } // Display as table-cell // ------------------------- .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; &:not(:first-child):not(:last-child) { border-radius: 0; } } // Addon and addon wrapper for buttons .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; // Match the inputs } // Text input groups // ------------------------- .input-group-addon { padding: @padding-base-vertical @padding-base-horizontal; font-size: @font-size-base; font-weight: normal; line-height: 1; color: @input-color; text-align: center; background-color: @input-group-addon-bg; border: 1px solid @input-group-addon-border-color; border-radius: @input-border-radius; // Sizing &.input-sm { padding: @padding-small-vertical @padding-small-horizontal; font-size: @font-size-small; border-radius: @input-border-radius-small; } &.input-lg { padding: @padding-large-vertical @padding-large-horizontal; font-size: @font-size-large; border-radius: @input-border-radius-large; } // Nuke default margins from checkboxes and radios to vertically center within. input[type="radio"], input[type="checkbox"] { margin-top: 0; } } // Reset rounded corners .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { .border-right-radius(0); } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { .border-left-radius(0); } .input-group-addon:last-child { border-left: 0; } // Button input groups // ------------------------- .input-group-btn { position: relative; // Jankily prevent input button groups from wrapping with `white-space` and // `font-size` in combination with `inline-block` on buttons. font-size: 0; white-space: nowrap; // Negative margin for spacing, position for bringing hovered/focused/actived // element above the siblings. > .btn { position: relative; + .btn { margin-left: -1px; } // Bring the "active" button to the front &:hover, &:focus, &:active { z-index: 2; } } // Negative margin to only have a 1px border between the two &:first-child { > .btn, > .btn-group { margin-right: -1px; } } &:last-child { > .btn, > .btn-group { z-index: 2; margin-left: -1px; } } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
mixins | Folder | 0755 |
|
|
.csscomb.json | File | 7.91 KB | 0644 |
|
.csslintrc | File | 456 B | 0644 |
|
alerts.less | File | 1.48 KB | 0644 |
|
badges.less | File | 1.17 KB | 0644 |
|
bootstrap.less | File | 1.26 KB | 0644 |
|
breadcrumbs.less | File | 594 B | 0644 |
|
button-groups.less | File | 5.55 KB | 0644 |
|
buttons.less | File | 3.58 KB | 0644 |
|
carousel.less | File | 5.52 KB | 0644 |
|
close.less | File | 764 B | 0644 |
|
code.less | File | 1.37 KB | 0644 |
|
component-animations.less | File | 666 B | 0644 |
|
dropdowns.less | File | 4.76 KB | 0644 |
|
forms.less | File | 15.45 KB | 0644 |
|
glyphicons.less | File | 19.34 KB | 0644 |
|
grid.less | File | 1.35 KB | 0644 |
|
input-groups.less | File | 4.18 KB | 0644 |
|
jumbotron.less | File | 1.13 KB | 0644 |
|
labels.less | File | 1.05 KB | 0644 |
|
list-group.less | File | 3.05 KB | 0644 |
|
media.less | File | 900 B | 0644 |
|
mixins.less | File | 1.11 KB | 0644 |
|
modals.less | File | 3.44 KB | 0644 |
|
navbar.less | File | 14.29 KB | 0644 |
|
navs.less | File | 4.81 KB | 0644 |
|
normalize.less | File | 7.38 KB | 0644 |
|
pager.less | File | 861 B | 0644 |
|
pagination.less | File | 2.01 KB | 0644 |
|
panels.less | File | 6.13 KB | 0644 |
|
popovers.less | File | 3.41 KB | 0644 |
|
print.less | File | 1.89 KB | 0644 |
|
progress-bars.less | File | 1.88 KB | 0644 |
|
responsive-embed.less | File | 546 B | 0644 |
|
responsive-utilities.less | File | 4.16 KB | 0644 |
|
scaffolding.less | File | 2.92 KB | 0644 |
|
tables.less | File | 4.5 KB | 0644 |
|
theme.less | File | 8 KB | 0644 |
|
thumbnails.less | File | 753 B | 0644 |
|
tooltip.less | File | 2.92 KB | 0644 |
|
type.less | File | 5.81 KB | 0644 |
|
utilities.less | File | 747 B | 0644 |
|
variables.less | File | 26.83 KB | 0644 |
|
wells.less | File | 527 B | 0644 |
|