11 // Ensure that the input is always above the *appended* addon button for
12 // proper border colors.
16 // Add width 1% and flex-basis auto to ensure that button will not wrap out
17 // the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
21 // Bring the "active" form control to the front
22 @include hover-focus-active {
30 .input-group .form-control {
31 // Vertically centers the content of the addons within the input group
33 flex-direction: column;
34 justify-content: center;
36 &:not(:first-child):not(:last-child) {
37 @include border-radius(0);
44 vertical-align: middle; // Match the inputs
50 // Remix the default form control sizing classes into new ones for easier
53 .input-group-lg > .form-control,
54 .input-group-lg > .input-group-addon,
55 .input-group-lg > .input-group-btn > .btn {
56 @extend .form-control-lg;
58 .input-group-sm > .form-control,
59 .input-group-sm > .input-group-addon,
60 .input-group-sm > .input-group-btn > .btn {
61 @extend .form-control-sm;
70 padding: $input-padding-y $input-padding-x;
71 margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
72 font-size: $font-size-base; // Match inputs
73 font-weight: $font-weight-normal;
74 line-height: $input-line-height;
77 background-color: $input-group-addon-bg;
78 border: $input-btn-border-width solid $input-group-addon-border-color;
79 @include border-radius($input-border-radius);
83 padding: $input-padding-y-sm $input-padding-x-sm;
84 font-size: $font-size-sm;
85 @include border-radius($input-border-radius-sm);
88 padding: $input-padding-y-lg $input-padding-x-lg;
89 font-size: $font-size-lg;
90 @include border-radius($input-border-radius-lg);
93 // scss-lint:disable QualifyingElement
94 // Nuke default margins from checkboxes and radios to vertically center within.
96 input[type="checkbox"] {
99 // scss-lint:enable QualifyingElement
104 // Reset rounded corners
107 .input-group .form-control:not(:last-child),
108 .input-group-addon:not(:last-child),
109 .input-group-btn:not(:last-child) > .btn,
110 .input-group-btn:not(:last-child) > .btn-group > .btn,
111 .input-group-btn:not(:last-child) > .dropdown-toggle,
112 .input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),
113 .input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {
114 @include border-right-radius(0);
116 .input-group-addon:not(:last-child) {
119 .input-group .form-control:not(:first-child),
120 .input-group-addon:not(:first-child),
121 .input-group-btn:not(:first-child) > .btn,
122 .input-group-btn:not(:first-child) > .btn-group > .btn,
123 .input-group-btn:not(:first-child) > .dropdown-toggle,
124 .input-group-btn:not(:last-child) > .btn:not(:first-child),
125 .input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {
126 @include border-left-radius(0);
128 .form-control + .input-group-addon:not(:first-child) {
133 // Button input groups
138 // Jankily prevent input button groups from wrapping with `white-space` and
139 // `font-size` in combination with `inline-block` on buttons.
143 // Negative margin for spacing, position for bringing hovered/focused/actived
144 // element above the siblings.
147 // Vertically stretch the button and center its content
151 margin-left: (-$input-btn-border-width);
154 // Bring the "active" button to the front
155 @include hover-focus-active {
160 // Negative margin to only have a single, shared border between the two
164 margin-right: (-$input-btn-border-width);
167 &:not(:first-child) {
171 margin-left: (-$input-btn-border-width);
172 // Because specificity
173 @include hover-focus-active {