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.
This commit is contained in:
parent
b1a6d357f9
commit
31830c7b32
16
dist/css/select2.css
vendored
16
dist/css/select2.css
vendored
@ -113,14 +113,14 @@
|
|||||||
filter: alpha(opacity=0); }
|
filter: alpha(opacity=0); }
|
||||||
|
|
||||||
.select2-hidden-accessible {
|
.select2-hidden-accessible {
|
||||||
border: 0;
|
border: 0 !important;
|
||||||
clip: rect(0 0 0 0);
|
clip: rect(0 0 0 0) !important;
|
||||||
height: 1px;
|
height: 1px !important;
|
||||||
margin: -1px;
|
margin: -1px !important;
|
||||||
overflow: hidden;
|
overflow: hidden !important;
|
||||||
padding: 0;
|
padding: 0 !important;
|
||||||
position: absolute;
|
position: absolute !important;
|
||||||
width: 1px; }
|
width: 1px !important; }
|
||||||
|
|
||||||
.select2-container--default .select2-selection--single {
|
.select2-container--default .select2-selection--single {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
2
dist/css/select2.min.css
vendored
2
dist/css/select2.min.css
vendored
File diff suppressed because one or more lines are too long
@ -34,14 +34,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select2-hidden-accessible {
|
.select2-hidden-accessible {
|
||||||
border: 0;
|
border: 0 !important;
|
||||||
clip: rect(0 0 0 0);
|
clip: rect(0 0 0 0) !important;
|
||||||
height: 1px;
|
height: 1px !important;
|
||||||
margin: -1px;
|
margin: -1px !important;
|
||||||
overflow: hidden;
|
overflow: hidden !important;
|
||||||
padding: 0;
|
padding: 0 !important;
|
||||||
position: absolute;
|
position: absolute !important;
|
||||||
width: 1px;
|
width: 1px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import "theme/default/layout";
|
@import "theme/default/layout";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user