As described in https://github.com/select2/select2/issues/3304#issuecomment-98395238, this updates the mixin to the latest stable version from Bootstrap Sass which adds Sass' http://sass-lang.com/documentation/Sass/Script/Functions.html#ie_hex_str-instance_method to ensure that colors are converted "into the format understood by IE filters".
13 lines
1 KiB
SCSS
13 lines
1 KiB
SCSS
// https://github.com/twbs/bootstrap-sass/blob/3.3-stable/assets/stylesheets/bootstrap/mixins/_gradients.scss#L17-L27
|
|
|
|
// Vertical gradient, from top to bottom
|
|
//
|
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
|
// Color stops are not available in IE9 and below.
|
|
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
|
background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
|
background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
|
|
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
|
background-repeat: repeat-x;
|
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
|
|
}
|