Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mauryaratan/5889783 to your computer and use it in GitHub Desktop.
Save mauryaratan/5889783 to your computer and use it in GitHub Desktop.
/*
* RGBa-Mixin with fallback (http://css-tricks.com/rgba-browser-support/)
*/
@mixin transparent-backgound($color: #000, $value:0.5)
$start: "rgb(";
$end: ")";
background: #{$start}red($color), green($color), blue($color)#{$end};
background: rgba($color, $value);
/*
* sass
*/
.cnt-matrix .info
@include transparent-backgound(#f29400, 0.85);
/*
* output
*/
.cnt-matrix .info {
background: rgb(242, 148, 0);
background: rgba(242, 148, 0, 0.85);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment