info@53: // info@53: // Input groups info@53: // -------------------------------------------------- info@53: info@53: // Base styles info@53: // ------------------------- info@53: .input-group { info@53: position: relative; // For dropdowns info@53: display: table; info@53: border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table info@53: info@53: // Undo padding and float of grid classes info@53: &[class*="col-"] { info@53: float: none; info@53: padding-left: 0; info@53: padding-right: 0; info@53: } info@53: info@53: .form-control { info@53: width: 100%; info@53: margin-bottom: 0; info@53: } info@53: } info@53: info@53: // Sizing options info@53: // info@53: // Remix the default form control sizing classes into new ones for easier info@53: // manipulation. info@53: info@53: .input-group-lg > .form-control, info@53: .input-group-lg > .input-group-addon, info@53: .input-group-lg > .input-group-btn > .btn { .input-lg(); } info@53: .input-group-sm > .form-control, info@53: .input-group-sm > .input-group-addon, info@53: .input-group-sm > .input-group-btn > .btn { .input-sm(); } info@53: info@53: info@53: // Display as table-cell info@53: // ------------------------- info@53: .input-group-addon, info@53: .input-group-btn, info@53: .input-group .form-control { info@53: display: table-cell; info@53: info@53: &:not(:first-child):not(:last-child) { info@53: border-radius: 0; info@53: } info@53: } info@53: // Addon and addon wrapper for buttons info@53: .input-group-addon, info@53: .input-group-btn { info@53: width: 1%; info@53: white-space: nowrap; info@53: vertical-align: middle; // Match the inputs info@53: } info@53: info@53: // Text input groups info@53: // ------------------------- info@53: .input-group-addon { info@53: padding: @padding-base-vertical @padding-base-horizontal; info@53: font-size: @font-size-base; info@53: font-weight: normal; info@53: line-height: 1; info@53: color: @input-color; info@53: text-align: center; info@53: background-color: @input-group-addon-bg; info@53: border: 1px solid @input-group-addon-border-color; info@53: border-radius: @border-radius-base; info@53: info@53: // Sizing info@53: &.input-sm { info@53: padding: @padding-small-vertical @padding-small-horizontal; info@53: font-size: @font-size-small; info@53: border-radius: @border-radius-small; info@53: } info@53: &.input-lg { info@53: padding: @padding-large-vertical @padding-large-horizontal; info@53: font-size: @font-size-large; info@53: border-radius: @border-radius-large; info@53: } info@53: info@53: // Nuke default margins from checkboxes and radios to vertically center within. info@53: input[type="radio"], info@53: input[type="checkbox"] { info@53: margin-top: 0; info@53: } info@53: } info@53: info@53: // Reset rounded corners info@53: .input-group .form-control:first-child, info@53: .input-group-addon:first-child, info@53: .input-group-btn:first-child > .btn, info@53: .input-group-btn:first-child > .dropdown-toggle, info@53: .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { info@53: .border-right-radius(0); info@53: } info@53: .input-group-addon:first-child { info@53: border-right: 0; info@53: } info@53: .input-group .form-control:last-child, info@53: .input-group-addon:last-child, info@53: .input-group-btn:last-child > .btn, info@53: .input-group-btn:last-child > .dropdown-toggle, info@53: .input-group-btn:first-child > .btn:not(:first-child) { info@53: .border-left-radius(0); info@53: } info@53: .input-group-addon:last-child { info@53: border-left: 0; info@53: } info@53: info@53: // Button input groups info@53: // ------------------------- info@53: .input-group-btn { info@53: position: relative; info@53: white-space: nowrap; info@53: info@53: // Negative margin to only have a 1px border between the two info@53: &:first-child > .btn { info@53: margin-right: -1px; info@53: } info@53: &:last-child > .btn { info@53: margin-left: -1px; info@53: } info@53: } info@53: .input-group-btn > .btn { info@53: position: relative; info@53: // Jankily prevent input button groups from wrapping info@53: + .btn { info@53: margin-left: -4px; info@53: } info@53: // Bring the "active" button to the front info@53: &:hover, info@53: &:active { info@53: z-index: 2; info@53: } info@53: }