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 { .input-lg(); }
43 .input-group-sm > .form-control,
44 .input-group-sm > .input-group-addon,
45 .input-group-sm > .input-group-btn > .btn { .input-sm(); }
48 // Display as table-cell
49 // -------------------------
52 .input-group .form-control {
55 &:not(:first-child):not(:last-child) {
59 // Addon and addon wrapper for buttons
64 vertical-align: middle; // Match the inputs
68 // -------------------------
70 padding: @padding-base-vertical @padding-base-horizontal;
71 font-size: @font-size-base;
76 background-color: @input-group-addon-bg;
77 border: 1px solid @input-group-addon-border-color;
78 border-radius: @border-radius-base;
82 padding: @padding-small-vertical @padding-small-horizontal;
83 font-size: @font-size-small;
84 border-radius: @border-radius-small;
87 padding: @padding-large-vertical @padding-large-horizontal;
88 font-size: @font-size-large;
89 border-radius: @border-radius-large;
92 // Nuke default margins from checkboxes and radios to vertically center within.
94 input[type="checkbox"] {
99 // Reset rounded corners
100 .input-group .form-control:first-child,
101 .input-group-addon:first-child,
102 .input-group-btn:first-child > .btn,
103 .input-group-btn:first-child > .btn-group > .btn,
104 .input-group-btn:first-child > .dropdown-toggle,
105 .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
106 .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
107 .border-right-radius(0);
109 .input-group-addon:first-child {
112 .input-group .form-control:last-child,
113 .input-group-addon:last-child,
114 .input-group-btn:last-child > .btn,
115 .input-group-btn:last-child > .btn-group > .btn,
116 .input-group-btn:last-child > .dropdown-toggle,
117 .input-group-btn:first-child > .btn:not(:first-child),
118 .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
119 .border-left-radius(0);
121 .input-group-addon:last-child {
125 // Button input groups
126 // -------------------------
129 // Jankily prevent input button groups from wrapping with `white-space` and
130 // `font-size` in combination with `inline-block` on buttons.
134 // Negative margin for spacing, position for bringing hovered/focused/actived
135 // element above the siblings.
141 // Bring the "active" button to the front
149 // Negative margin to only have a 1px border between the two