Skip to content

Commit e22f031

Browse files
committed
feat: 🎸 enable to disable border-radius (closes #38)
1 parent 9c09b0f commit e22f031

5 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎dist/select2-bootstrap4.css‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ form.was-validated select:valid ~ .select2-container--bootstrap4 .select2-select
129129

130130
.select2-container--bootstrap4 .select2-dropdown {
131131
border-color: #ced4da;
132-
border-top: none;
133-
border-top-left-radius: 0;
134-
border-top-right-radius: 0; }
132+
border-radius: 0; }
133+
.select2-container--bootstrap4 .select2-dropdown.select2-dropdown--below {
134+
border-top: none;
135+
border-bottom-right-radius: 0.25rem;
136+
border-bottom-left-radius: 0.25rem; }
135137
.select2-container--bootstrap4 .select2-dropdown.select2-dropdown--above {
136138
border-top: 1px solid #ced4da;
137139
border-top-left-radius: 0.25rem;

‎dist/select2-bootstrap4.min.css‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/_multiple.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
.select2-selection__choice {
2222
color: $dark;
2323
border: 1px solid darken($light, 20%);
24-
border-radius: $btn-border-radius-sm;
24+
@include border-radius($input-border-radius-sm);
2525
padding: 0;
2626
padding-right: 5px;
2727
cursor: pointer;

‎src/_single.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
// search box
4343
.select2-search--dropdown .select2-search__field {
4444
border: $input-border-width solid $input-border-color;
45-
border-radius: $input-border-radius;
45+
@include border-radius($input-border-radius);
4646
}
4747

4848
// no result message

‎src/layout.scss‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@
8383
// dropdown
8484
.select2-dropdown {
8585
border-color: $input-border-color;
86+
border-radius: 0; // overwrite select2.css
8687

87-
border-top: none;
88-
border-top-left-radius: 0;
89-
border-top-right-radius: 0;
88+
// dropdown opened below
89+
&.select2-dropdown--below {
90+
border-top: none;
91+
@include border-bottom-radius($input-border-radius);
92+
}
9093

9194
// dropdown opened above
9295
&.select2-dropdown--above {
9396
border-top: 1px solid $input-border-color;
94-
border-top-left-radius: $input-border-radius;
95-
border-top-right-radius: $input-border-radius;
97+
@include border-top-radius($input-border-radius);
9698
}
9799

98100
// selected item

0 commit comments

Comments
 (0)