Skip to content

Instantly share code, notes, and snippets.

@mattmcmanus
Created March 31, 2011 01:40
Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mattmcmanus/895668 to your computer and use it in GitHub Desktop.
Save mattmcmanus/895668 to your computer and use it in GitHub Desktop.
A collection of mixins for Stylus to make using css3 a breeze
// MIXINS
vendor(prop, args)
-webkit-{prop} args
-moz-{prop} args
-o-{prop} args
{prop} args
animation()
vendor('animation', arguments)
border-radius()
vendor('border-radius', arguments)
border-top-radius()
vendor('border-top-left-radius', arguments)
vendor('border-top-right-radius', arguments)
border-top-radius()
vendor('border-bottom-left-radius', arguments)
vendor('border-bottom-right-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
box(orient, pack, align)
display -webkit-box
display -moz-box
display box
vendor('box-orient', orient)
vendor('box-pack', pack)
vendor('box-align', align)
vendor('box-lines', multiple)
box_flex()
vendor('box-flex', arguments)
text-fill-color()
vendor('text-fill-color', arguments)
transition()
vendor('transition', arguments)
transform()
vendor('transform', arguments)
@AngeloMerlo
Copy link

nice

@Sauloxd
Copy link

Sauloxd commented Jul 20, 2015

nice

@Loiree
Copy link

Loiree commented Oct 14, 2015

nice

@sepehrhosseini
Copy link

nice

@claudchan
Copy link

Thanks.
Possible to add transition with multiple arguments?

@zheeeng
Copy link

zheeeng commented Apr 17, 2017

Thx.
Can support add linear gradient multiple times?

@hobroker
Copy link

hobroker commented Jun 7, 2017

thx, you're doing Zeus's work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment