Last active
December 29, 2015 13:09
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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