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 // IE9 fubars the placeholder attribute in text inputs and the arrows on
21 // select elements in input groups. To fix it, we float the input. Details:
22 // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
32 // Remix the default form control sizing classes into new ones for easier
35 .input-group-lg > .form-control,
36 .input-group-lg > .input-group-addon,
37 .input-group-lg > .input-group-btn > .btn { .input-lg(); }
38 .input-group-sm > .form-control,
39 .input-group-sm > .input-group-addon,
40 .input-group-sm > .input-group-btn > .btn { .input-sm(); }
43 // Display as table-cell
44 // -------------------------
47 .input-group .form-control {
50 &:not(:first-child):not(:last-child) {
54 // Addon and addon wrapper for buttons
59 vertical-align: middle; // Match the inputs
63 // -------------------------
65 padding: @padding-base-vertical @padding-base-horizontal;
66 font-size: @font-size-base;
71 background-color: @input-group-addon-bg;
72 border: 1px solid @input-group-addon-border-color;
73 border-radius: @border-radius-base;
77 padding: @padding-small-vertical @padding-small-horizontal;
78 font-size: @font-size-small;
79 border-radius: @border-radius-small;
82 padding: @padding-large-vertical @padding-large-horizontal;
83 font-size: @font-size-large;
84 border-radius: @border-radius-large;
87 // Nuke default margins from checkboxes and radios to vertically center within.
89 input[type="checkbox"] {
94 // Reset rounded corners
95 .input-group .form-control:first-child,
96 .input-group-addon:first-child,
97 .input-group-btn:first-child > .btn,
98 .input-group-btn:first-child > .btn-group > .btn,
99 .input-group-btn:first-child > .dropdown-toggle,
100 .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
101 .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
102 .border-right-radius(0);
104 .input-group-addon:first-child {
107 .input-group .form-control:last-child,
108 .input-group-addon:last-child,
109 .input-group-btn:last-child > .btn,
110 .input-group-btn:last-child > .btn-group > .btn,
111 .input-group-btn:last-child > .dropdown-toggle,
112 .input-group-btn:first-child > .btn:not(:first-child),
113 .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
114 .border-left-radius(0);
116 .input-group-addon:last-child {
120 // Button input groups
121 // -------------------------
124 // Jankily prevent input button groups from wrapping with `white-space` and
125 // `font-size` in combination with `inline-block` on buttons.
129 // Negative margin for spacing, position for bringing hovered/focused/actived
130 // element above the siblings.
136 // Bring the "active" button to the front
144 // Negative margin to only have a 1px border between the two