-
-
Save TexRx/9201453 to your computer and use it in GitHub Desktop.
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 gray($intensity, $alpha: 1) { | |
@return rgba($intensity, $intensity, $intensity, $alpha); | |
} | |
/* Thanks Chris Eppstein for simplifying my code! */ | |
/* Testing our new function */ | |
body { | |
background: gray(50%); | |
background: gray(255, .2); | |
} | |
/* Test should output something like: */ | |
body { | |
background: #7f7f7f; | |
background: rgba(255, 255, 255, 0.2); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment