select2-bootstrap4-theme icon indicating copy to clipboard operation
select2-bootstrap4-theme copied to clipboard

.input-group not working

Open cautnew opened this issue 6 years ago • 2 comments

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 avatar Sep 29 '18 04:09 cautnew

@cautnew if you could thoroughly test this and create a PR that would be awesome.

VictorioBerra avatar Oct 01 '18 14:10 VictorioBerra

The bootstrap css is flex: 1 1 auto, and width: 1%, but I must admit that it's not quite right for Safari

ellenhutchings avatar Oct 25 '18 02:10 ellenhutchings