1
0
mirror of synced 2025-02-04 06:09:23 +03:00

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 https://github.com/select2/select2/issues/2978.
This commit is contained in:
Kevin Brown 2015-01-27 14:09:52 -05:00
parent 9906b2f434
commit 65ff76c543
3 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,8 @@
padding: 4px; } padding: 4px; }
.select2-search--dropdown .select2-search__field { .select2-search--dropdown .select2-search__field {
padding: 4px; padding: 4px;
width: 100%; } width: 100%;
box-sizing: border-box; }
.select2-search--dropdown.select2-search--hide { .select2-search--dropdown.select2-search--hide {
display: none; } display: none; }

File diff suppressed because one or more lines are too long

View File

@ -60,6 +60,7 @@
.select2-search__field { .select2-search__field {
padding: 4px; padding: 4px;
width: 100%; width: 100%;
box-sizing: border-box;
} }
&.select2-search--hide { &.select2-search--hide {