// These are overrides from the bootstrap-theme .select2-container--bootstrap .select2-selection--single { line-height: 1.5; height: 38px; } .select2-container--bootstrap .select2-selection--multiple { line-height: 1.5; min-height: 38px; } .select2-container--bootstrap .select2-selection { font-size: 1rem; } .select2-container .select2-selection--single .select2-selection__rendered { margin: 0 0 0 0.5rem; } .select2-container--bootstrap .select2-selection--single .select2-selection__clear { float: none; position: absolute; margin: 0; left: 7px; width: 10px; } .select2-dropdown .select2-dropdown--below, .select2-container--open .select2-dropdown--below, .select2-container--bootstrap .select2-dropdown { min-width: 200px; } .select2-container .select2-search--inline .select2-search__field { width: 100% !important; } .select2-container--focus:not(.select2-container--open) { box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6); outline: 0 none; } .select2-container--focus { .select2-selection { border: 1px solid #9cd5fe; } } // effective_select option "hide_disabled: true" .select2-container.hide-disabled .select2-results__option[aria-disabled=true] { display: none; } form.form-inline .select2-container--bootstrap { display: inline-block; width: auto; max-width: 300px; } // Bootstrap 4 Feedback client side .was-validated .form-control:invalid ~ .select2 { .select2-selection { border: 1px solid #dc3545; } } .was-validated .form-control:valid ~ .select2 { .select2-selection { border: 1px solid #28a745; } } .was-validated .form-control:invalid ~ .select2-container--focus { .select2-selection { border: 1px solid #dc3545; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } } .was-validated .form-control:valid ~ .select2-container--focus { .select2-selection { border: 1px solid #28a745; box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } } // Bootstrap 4 Feedback server side .form-control.is-invalid ~ .select2 { .select2-selection { border: 1px solid #dc3545; } } .form-control.is-valid ~ .select2 { .select2-selection { border: 1px solid #28a745; } } .form-control.is-invalid ~ .select2-container--focus { .select2-selection { border: 1px solid #dc3545; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } } .form-control.is-valid ~ .select2-container--focus { .select2-selection { border: 1px solid #28a745; box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); } } // Remove the selected results from the list when in multiple mode .select2-results__options[aria-multiselectable=true] { .select2-results__option[aria-selected=true] { display: none; } .select2-results__option:last-child[aria-selected=true] { display: inline-block; visibility: hidden; height: 1px; } }