3 // --------------------------------------------------
6 // -------------------------
8 position: relative; // For dropdowns
10 border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
12 // Undo padding and float of grid classes
20 // Ensure that the input is always above the *appended* addon button for
21 // proper border colors.
25 // IE9 fubars the placeholder attribute in text inputs and the arrows on
26 // select elements in input groups. To fix it, we float the input. Details:
27 // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
37 // Remix the default form control sizing classes into new ones for easier
40 .input-group-lg > .form-control,
41 .input-group-lg > .input-group-addon,
42 .input-group-lg > .input-group-btn > .btn {
46 .input-group-sm > .form-control,
47 .input-group-sm > .input-group-addon,
48 .input-group-sm > .input-group-btn > .btn {
52 // Display as table-cell
53 // -------------------------
56 .input-group .form-control {
59 &:not(:first-child):not(:last-child) {
64 // Addon and addon wrapper for buttons
69 vertical-align: middle; // Match the inputs
73 // -------------------------
75 padding: $padding-base-vertical $padding-base-horizontal;
76 font-size: $font-size-base;
81 background-color: $input-group-addon-bg;
82 border: 1px solid $input-group-addon-border-color;
83 border-radius: $border-radius-base;
87 padding: $padding-small-vertical $padding-small-horizontal;
88 font-size: $font-size-small;
89 border-radius: $border-radius-small;
92 padding: $padding-large-vertical $padding-large-horizontal;
93 font-size: $font-size-large;
94 border-radius: $border-radius-large;
97 // Nuke default margins from checkboxes and radios to vertically center within.
99 input[type="checkbox"] {
104 // Reset rounded corners
105 .input-group .form-control:first-child,
106 .input-group-addon:first-child,
107 .input-group-btn:first-child > .btn,
108 .input-group-btn:first-child > .btn-group > .btn,
109 .input-group-btn:first-child > .dropdown-toggle,
110 .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
111 .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
112 @include border-right-radius(0);
115 .input-group-addon:first-child {
119 .input-group .form-control:last-child,
120 .input-group-addon:last-child,
121 .input-group-btn:last-child > .btn,
122 .input-group-btn:last-child > .btn-group > .btn,
123 .input-group-btn:last-child > .dropdown-toggle,
124 .input-group-btn:first-child > .btn:not(:first-child),
125 .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
126 @include border-left-radius(0);
129 .input-group-addon:last-child {
133 // Button input groups
134 // -------------------------
137 // Jankily prevent input button groups from wrapping with `white-space` and
138 // `font-size` in combination with `inline-block` on buttons.
142 // Negative margin for spacing, position for bringing hovered/focused/actived
143 // element above the siblings.
149 // Bring the "active" button to the front
157 // Negative margin to only have a 1px border between the two