12345678910111213141516171819202122232425 |
- // produces a partly opaque background using RGB alpha channel
- // with a workaround for IE8 that doesn't support it
- @mixin background-opacity(
- $background-color: null,
- $opacity: 1,
- $include-ie: $include-ie
- ) {
- @if $background-color == transparent {
- background-color: $background-color;
- } @else {
- $background-opaque: rgba($background-color, $opacity);
- background-image: none;
- background-color: $background-opaque;
- @if $include-ie {
- $ie-background-str: ie-hex-str($background-opaque);
- .#{$prefix}ie8 & {
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie-background-str}, endColorstr=#{$ie-background-str})";
- zoom: 1;
- }
- }
- }
- }
|