apalfrey / select2-bootstrap-5-theme

A Select2 v4 theme for Bootstrap 5
https://apalfrey.github.io/select2-bootstrap-5-theme/
MIT License
212 stars 48 forks source link

SCSS Floating Labels #78

Open Brianuk9 opened 1 year ago

Brianuk9 commented 1 year ago

HI there

I'm using Bootstrap 5.3,0-aplha1 and making use of floating labels on all inputs including selects. All works well until I enable the Select2 extension - once I do the labels on Selects don't show. As a test I used the sample code from the Bootstrap examples page:

<div class="col-sm-10">
    <div class="form-floating">
        <select class="form-select" id="floatingSelect" aria-label="Floating label select example">
            <option selected>Open this select menu</option>
            <option value="1">One</option>
            <option value="2">Two</option>
            <option value="3">Three</option>
        </select>
        <label for="floatingSelect">Works with selects</label>
    </div>
</div>

Once select2 is enabled the label doesn't show.

Great software by the way! ;)

PS: I did try Bootstrap 5.2 but same issue.....