Last active
August 29, 2015 14:03
-
-
Save drifterz28/38ca6b02f35023f9ce24 to your computer and use it in GitHub Desktop.
Sass function to turn alpha in rgba to a float
This file contains hidden or 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
| @function float-rgba($r, $g, $b, $a-float) { | |
| $alpha: $a-float / 255; | |
| @return rgba($r, $g, $b, $alpha) | |
| } | |
| //EXAMPLE | |
| .someclass { | |
| color: float-rgba(255, 255, 255, 100); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment