Skip to content

Instantly share code, notes, and snippets.

@szeidler
Created December 12, 2014 11:54
Show Gist options
  • Select an option

  • Save szeidler/0a9e65200a87249a9349 to your computer and use it in GitHub Desktop.

Select an option

Save szeidler/0a9e65200a87249a9349 to your computer and use it in GitHub Desktop.
Add's crossbrowser alpha-transparency background-color ability
// Usage: @include transparent(#000, 0.6);
@mixin transparent($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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment