// // Base styles // .input-group { position: relative; display: flex; flex-wrap: wrap; // For form validation feedback align-items: stretch; width: 100%; > .form-control, > .form-select, > .form-file { position: relative; // For focus state's z-index flex: 1 1 auto; width: 1%; min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size } // Bring the "active" form control to the top of surrounding elements > .form-control:focus, > .form-select:focus, > .form-file .form-file-input:focus ~ .form-file-label { z-index: 3; } // Bring the custom file input above the label > .form-file { > .form-file-input:focus { z-index: 4; } &:not(:last-child) > .form-file-label { @include border-right-radius(0); } &:not(:first-child) > .form-file-label { @include border-left-radius(0); } } // Ensure buttons are always above inputs for more visually pleasing borders. // This isn't needed for `.input-group-text` since it shares the same border-color // as our inputs. .btn { position: relative; z-index: 2; &:focus { z-index: 3; } } } // Textual addons // // Serves as a catch-all element for any text or radio/checkbox input you wish // to prepend or append to an input. .input-group-text { display: flex; align-items: center; padding: $input-padding-y $input-padding-x; margin-bottom: 0; // Allow use of