8 flex-wrap: wrap; // For form validation feedback
15 position: relative; // For focus state's z-index
18 min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
21 // Bring the "active" form control to the top of surrounding elements
22 > .form-control:focus,
24 > .form-floating:focus-within {
28 // Ensure buttons are always above inputs for more visually pleasing borders.
29 // This isn't needed for `.input-group-text` since it shares the same border-color
44 // Serves as a catch-all element for any text or radio/checkbox input you wish
45 // to prepend or append to an input.
50 padding: $input-group-addon-padding-y $input-group-addon-padding-x;
51 @include font-size($input-font-size); // Match inputs
52 font-weight: $input-group-addon-font-weight;
53 line-height: $input-line-height;
54 color: $input-group-addon-color;
57 background-color: $input-group-addon-bg;
58 border: $input-border-width solid $input-group-addon-border-color;
59 @include border-radius($input-border-radius);
65 // Remix the default form control sizing classes into new ones for easier
68 .input-group-lg > .form-control,
69 .input-group-lg > .form-select,
70 .input-group-lg > .input-group-text,
71 .input-group-lg > .btn {
72 padding: $input-padding-y-lg $input-padding-x-lg;
73 @include font-size($input-font-size-lg);
74 @include border-radius($input-border-radius-lg);
77 .input-group-sm > .form-control,
78 .input-group-sm > .form-select,
79 .input-group-sm > .input-group-text,
80 .input-group-sm > .btn {
81 padding: $input-padding-y-sm $input-padding-x-sm;
82 @include font-size($input-font-size-sm);
83 @include border-radius($input-border-radius-sm);
86 .input-group-lg > .form-select,
87 .input-group-sm > .form-select {
88 padding-right: $form-select-padding-x + $form-select-indicator-padding;
94 // These rulesets must come after the sizing ones to properly override sm and lg
95 // border-radius values when extending. They're more specific than we'd like
96 // with the `.input-group >` part, but without it, we cannot override the sizing.
98 // stylelint-disable-next-line no-duplicate-selectors
100 &:not(.has-validation) {
101 > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
102 > .dropdown-toggle:nth-last-child(n + 3),
103 > .form-floating:not(:last-child) > .form-control,
104 > .form-floating:not(:last-child) > .form-select {
105 @include border-end-radius(0);
110 > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
111 > .dropdown-toggle:nth-last-child(n + 4),
112 > .form-floating:nth-last-child(n + 3) > .form-control,
113 > .form-floating:nth-last-child(n + 3) > .form-select {
114 @include border-end-radius(0);
118 $validation-messages: "";
119 @each $state in map-keys($form-validation-states) {
120 $validation-messages: $validation-messages + ":not(." + unquote($state) + "-tooltip)" + ":not(." + unquote($state) + "-feedback)";
123 > :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
124 margin-left: -$input-border-width;
125 @include border-start-radius(0);
128 > .form-floating:not(:first-child) > .form-control,
129 > .form-floating:not(:first-child) > .form-select {
130 @include border-start-radius(0);