Skip to content

Commit 65ff76c

Browse files
committed
Fix dropdown search sizing
When Select2 is not used with a design that universally sets `box-sizing: border-box` to elements, the search box previously would take up more space than expected. This fixed the issue by adding the `box-sizing` rule to the search box. This closes select2#2978.
1 parent 9906b2f commit 65ff76c

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

dist/css/select2.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
padding: 4px; }
8484
.select2-search--dropdown .select2-search__field {
8585
padding: 4px;
86-
width: 100%; }
86+
width: 100%;
87+
box-sizing: border-box; }
8788
.select2-search--dropdown.select2-search--hide {
8889
display: none; }
8990

0 commit comments

Comments
 (0)