Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mathiasschopmans/448712 to your computer and use it in GitHub Desktop.
Save mathiasschopmans/448712 to your computer and use it in GitHub Desktop.
/*
* RGBa-Mixin with fallback (http://css-tricks.com/rgba-browser-support/)
*/
=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
+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