Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple select2 option height #12

Open
gotexis opened this issue Aug 12, 2018 · 2 comments
Open

Multiple select2 option height #12

gotexis opened this issue Aug 12, 2018 · 2 comments

Comments

@gotexis
Copy link

gotexis commented Aug 12, 2018

image

@gotexis
Copy link
Author

gotexis commented Aug 12, 2018

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;
}

@flaushi
Copy link

flaushi commented Jan 16, 2019

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;
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants