select2-bootstrap4-theme
select2-bootstrap4-theme copied to clipboard
.input-group not working
When using component input-group from Bootstrap4 it doesn't fit well. I've tried for many hours and so I got a solution. Comparing the attributes between the tags that fit well not using select2, I had the idea to apply the same set for both and so it's perfect! Here is my solution: in select2-bootstrap4.css line 418 we have that code:
.input-group > .select2-container--bootstrap4 {
display: table;
table-layout: fixed;
position: relative;
z-index: 2;
width: 100%;
margin-bottom: 0;
}
We only need to add flex: 1 1;
and check it out. Here it is:
.input-group > .select2-container--bootstrap4 {
display: table;
flex: 1 1;
table-layout: fixed;
position: relative;
z-index: 2;
width: 100%;
margin-bottom: 0;
}
@cautnew if you could thoroughly test this and create a PR that would be awesome.
The bootstrap css is flex: 1 1 auto, and width: 1%
, but I must admit that it's not quite right for Safari