Last active
November 15, 2017 04:27
-
-
Save lucasjs/71256ee89fe1c8a77ea458ebf0c467fe to your computer and use it in GitHub Desktop.
Stylus mixins
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
// @stylint off | |
vendor(prop, args) { | |
-webkit-{prop}: args; | |
-moz-{prop}: args; | |
-o-{prop}: args; | |
{prop}: args; | |
} | |
animation() { | |
vendor('animation', arguments); | |
} | |
border-radius() { | |
vendor('border-radius', arguments); | |
} | |
linear-gradient(start_color, end_color, start = left top, end = left bottom) { | |
mozstart = top if start = left top | |
background: start_color; | |
background: -moz-linear-gradient(mozstart, start_color 0%, end_color 100%); | |
background: -webkit-gradient(linear, start, end, color-stop(0%, start_color), color-stop(100%, end_color)); | |
-webkit-background-origin: padding-box; | |
} | |
background-clip() { | |
vendor('background-clip', arguments); | |
} | |
box-shadow() { | |
-moz-box-shadow: arguments; | |
-webkit-box-shadow: arguments; | |
box-shadow: arguments; | |
} | |
flexbox() { | |
display: -webkit-flex; | |
display: flex; | |
} | |
flex() { | |
vendor('flex', arguments); | |
} | |
text-fill-color() { | |
vendor('text-fill-color', arguments); | |
} | |
transition() { | |
vendor('transition', arguments); | |
} | |
transform() { | |
vendor('transform', arguments); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment