Skip to content

Instantly share code, notes, and snippets.

@hectorpalmatellez
Last active December 29, 2015 13:09
Show Gist options
  • Save hectorpalmatellez/7675288 to your computer and use it in GitHub Desktop.
Save hectorpalmatellez/7675288 to your computer and use it in GitHub Desktop.
Mixin en Compass para generar transparencias compatibles desde IE viejo en adelante. Con RGBA para lo moderno.
@mixin transparencia($color, $alpha) {
$rgba: rgba($color, $alpha);
$ie-hex-str: ie-hex-str($rgba);
background-color: transparent;
background-color: $rgba;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie-hex-str},endColorstr=#{$ie-hex-str});
zoom: 1;
}
// Uso:
// @include transparencia(#[color], 1);
// Ejemplo:
// .caja-bonita {
// @include transparencia(#000000, .3);
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment