Prechádzať zdrojové kódy

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.
Kevin Brown 10 rokov pred
rodič
commit
65ff76c543

+ 2 - 1
dist/css/select2.css

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

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/css/select2.min.css


+ 1 - 0
src/scss/_dropdown.scss

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

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov