Browse Source

Add `!important` to `.select2-hidden-accessible`.

`.select2-hidden-accessible` is the CSS class that is added to the original `<select>` element (that Select2 is initialized on) to hide it.
In cases where the original `<select>` has other style declarations assigned which conflict with those of `.select2-hidden-accessible`, the latter styles may be overridden, possibly resulting in the original `<select>` element not being properly hidden.

Similar to what https://github.com/select2/select2/pull/1549 did for Select2 v3's CSS, this adds the `!important` rule to all style declarations for `.select2-hidden-accessible` to make it exponentially harder to override them.
Florian Kissling 10 years ago
parent
commit
31830c7b32
3 changed files with 16 additions and 16 deletions
  1. 8 8
      dist/css/select2.css
  2. 0 0
      dist/css/select2.min.css
  3. 8 8
      src/scss/core.scss

+ 8 - 8
dist/css/select2.css

@@ -113,14 +113,14 @@
   filter: alpha(opacity=0); }
 
 .select2-hidden-accessible {
-  border: 0;
-  clip: rect(0 0 0 0);
-  height: 1px;
-  margin: -1px;
-  overflow: hidden;
-  padding: 0;
-  position: absolute;
-  width: 1px; }
+  border: 0 !important;
+  clip: rect(0 0 0 0) !important;
+  height: 1px !important;
+  margin: -1px !important;
+  overflow: hidden !important;
+  padding: 0 !important;
+  position: absolute !important;
+  width: 1px !important; }
 
 .select2-container--default .select2-selection--single {
   background-color: #fff;

File diff suppressed because it is too large
+ 0 - 0
dist/css/select2.min.css


+ 8 - 8
src/scss/core.scss

@@ -34,14 +34,14 @@
 }
 
 .select2-hidden-accessible {
-  border: 0;
-  clip: rect(0 0 0 0);
-  height: 1px;
-  margin: -1px;
-  overflow: hidden;
-  padding: 0;
-  position: absolute;
-  width: 1px;
+  border: 0 !important;
+  clip: rect(0 0 0 0) !important;
+  height: 1px !important;
+  margin: -1px !important;
+  overflow: hidden !important;
+  padding: 0 !important;
+  position: absolute !important;
+  width: 1px !important;
 }
 
 @import "theme/default/layout";

Some files were not shown because too many files changed in this diff