Created
February 21, 2012 12:05
-
-
Save Hubro/1876138 to your computer and use it in GitHub Desktop.
Shortcut function for top-down css gradients, written in stylus
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
// Shortcut for top-down gradient background color | |
td_gradient(color1, color2) | |
background-color (color1 + (color2 - color1) / 2) | |
background -webkit-gradient(linear, 0% 0%, 0% 100%, from(color1), to(color2)) | |
background -webkit-linear-gradient(top, color1, color2) | |
background -moz-linear-gradient(top, color1, color2) | |
background -ms-linear-gradient(top, color1, color2) | |
background -o-linear-gradient(top, color1, color2) | |
@css | |
{ | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=color1, endColorstr=color2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment