// // Base styles // .input-group { position: relative; @if $enable-flex { display: flex; } @else { display: table; // Prevent input groups from inheriting border styles from table cells when // placed within a table. border-collapse: separate; } .form-control { // Ensure that the input is always above the *appended* addon button for // proper border colors. position: relative; z-index: 2; // Bring the "active" form control to the front @include hover-focus-active { z-index: 3; } @if $enable-flex { flex: 1; } @else { // 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; } } .input-group-addon, .input-group-btn, .input-group .form-control { @if $enable-flex { // do nothing } @else { display: table-cell; } &:not(:first-child):not(:last-child) { @include border-radius(0); } } .input-group-addon, .input-group-btn { @if $enable-flex { // do nothing } @else { width: 1%; } white-space: nowrap; vertical-align: middle; // Match the inputs } // 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 { @extend .form-control-lg; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { @extend .form-control-sm; } // // Text input groups // .input-group-addon { padding: $input-padding-y $input-padding-x; margin-bottom: 0; // Allow use of