Skip to content

Commit e047b0d

Browse files
committed
feat: 🎸 beautify around the clear button of multiple selector
1 parent f8d75f6 commit e047b0d

4 files changed

Lines changed: 38 additions & 6 deletions

File tree

‎dist/select2-bootstrap4.css‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
float: left; }
6161
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
6262
color: #343a40; }
63+
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
64+
float: none;
65+
margin-right: 0;
66+
position: absolute !important;
67+
top: 0;
68+
right: 0.7em; }
6369

6470
.select2-container {
6571
display: block; }

‎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.

‎docs/index.html‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,26 @@ <h3>Example of <a href="https://github.com/ttskch/select2-bootstrap4-theme" targ
3636
<div class="form-group">
3737
<label>Example of multiple select</label>
3838
<select multiple data-placeholder="Choose anything" data-allow-clear="1">
39-
<option>1</option>
40-
<option>2</option>
41-
<option>3</option>
42-
<option>4</option>
43-
<option>5</option>
39+
<option>Tommy Yount</option>
40+
<option>Hye Panter</option>
41+
<option>Vi Yohe</option>
42+
<option>Keva Bandy</option>
43+
<option>Hannelore Corning</option>
44+
<option>Delorse Whitcher</option>
45+
<option>Katharyn Marrinan</option>
46+
<option>Jeannine Tope</option>
47+
<option>Jamila Braggs</option>
48+
<option>Eden Cunniff</option>
49+
<option>Suzy Schoen</option>
50+
<option>Elza Mccook</option>
51+
<option>Liana Goris</option>
52+
<option>Pauletta Schlabach</option>
53+
<option>Synthia Dupuis</option>
54+
<option>Scarlett Kestler</option>
55+
<option>Magdalen Mele</option>
56+
<option>Susanna Schenk</option>
57+
<option>Else Stupka</option>
58+
<option>Pennie Khang</option>
4459
</select>
4560
</div>
4661
<div class="form-group">

‎src/_multiple.scss‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,16 @@
4444
color: $dark;
4545
}
4646
}
47+
48+
// all clear button
49+
.select2-selection__clear {
50+
// overwrite layout.scss
51+
float: none;
52+
margin-right: 0;
53+
54+
position: absolute !important;
55+
top: 0;
56+
right: 0.7em;
57+
}
4758
}
4859
}

0 commit comments

Comments
 (0)