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

Multiple select2 option height

Open gotexis opened this issue 7 years ago • 2 comments

image

gotexis avatar Aug 12 '18 08:08 gotexis

Had to fix the margin below "margin: -0.25rem" to something like "0.25rem"

} .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { color: #495057; background: transparent; border: 1px solid #343a40; border-radius: 0.25rem; cursor: default; float: left; margin: -0.25rem 0 0 0.1875rem; padding: 0 0.75rem; }

gotexis avatar Aug 12 '18 08:08 gotexis

Yes, I can confirm the problem. It is actually a bug in select2-bootstrap4.scss line 368:

.select2-selection__choice {
      color: $s2bs-input-color;
      background: $s2bs-btn-default-bg;
      border: $s2bs-input-border-width solid $s2bs-btn-default-border;
      @include border-radius($s2bs-selection-choice-border-radius);
      cursor: default;
      float: left;
      margin: ($s2bs-padding-base-vertical - 1) 0 0 $s2bs-padding-base-horizontal/2;
      padding: 0 $s2bs-padding-base-vertical; //<------
    }

Zero is wrong here. Fix:

@import "~select2-bootstrap4-theme/src/select2-bootstrap4";
.select2-container--bootstrap4 {
    .select2-selection--multiple {

        .select2-selection__choice {
            padding: $s2bs-padding-base-horizontal $s2bs-padding-base-vertical;
        }
    }
}

flaushi avatar Jan 16 '19 16:01 flaushi