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 {
45 .input-group-sm > .form-control,
46 .input-group-sm > .input-group-addon,
47 .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) {
63 // Addon and addon wrapper for buttons
68 vertical-align: middle; // Match the inputs
72 // -------------------------
74 padding: @padding-base-vertical @padding-base-horizontal;
75 font-size: @font-size-base;
80 background-color: @input-group-addon-bg;
81 border: 1px solid @input-group-addon-border-color;
82 border-radius: @border-radius-base;
86 padding: @padding-small-vertical @padding-small-horizontal;
87 font-size: @font-size-small;
88 border-radius: @border-radius-small;
91 padding: @padding-large-vertical @padding-large-horizontal;
92 font-size: @font-size-large;
93 border-radius: @border-radius-large;
96 // Nuke default margins from checkboxes and radios to vertically center within.
98 input[type="checkbox"] {
103 // Reset rounded corners
104 .input-group .form-control:first-child,
105 .input-group-addon:first-child,
106 .input-group-btn:first-child > .btn,
107 .input-group-btn:first-child > .btn-group > .btn,
108 .input-group-btn:first-child > .dropdown-toggle,
109 .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
110 .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
111 .border-right-radius(0);
113 .input-group-addon:first-child {
116 .input-group .form-control:last-child,
117 .input-group-addon:last-child,
118 .input-group-btn:last-child > .btn,
119 .input-group-btn:last-child > .btn-group > .btn,
120 .input-group-btn:last-child > .dropdown-toggle,
121 .input-group-btn:first-child > .btn:not(:first-child),
122 .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
123 .border-left-radius(0);
125 .input-group-addon:last-child {
129 // Button input groups
130 // -------------------------
133 // Jankily prevent input button groups from wrapping with `white-space` and
134 // `font-size` in combination with `inline-block` on buttons.
138 // Negative margin for spacing, position for bringing hovered/focused/actived
139 // element above the siblings.
145 // Bring the "active" button to the front
153 // Negative margin to only have a 1px border between the two