Forked from mathiasschopmans/RGBa-Mixin with fallback for sass
Last active
August 30, 2021 12:15
-
-
Save mauryaratan/5889783 to your computer and use it in GitHub Desktop.
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
/* | |
* 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