Created
November 5, 2012 14:04
-
-
Save m4dz/4017334 to your computer and use it in GitHub Desktop.
LessCSS Radial Gradient compliant mixin
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
.radial-gradient(@position, @cover, @begin, @end, ...) { | |
@props: ~`"@{arguments}".replace(/[\[\]]/g, '')`; | |
@stop_color: ~`"@{props}".split(/[\s,]+/).slice(-2, -1)`; | |
background-color: @stop_color; | |
background: -webkit-radial-gradient(@props); | |
background: -moz-radial-gradient(@props); | |
background: -ms-radial-gradient(@props); | |
background: -o-radial-gradient(@props); | |
background: radial-gradient(@props); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment