stylus / nib

Stylus mixins, utilities, components, and gradient image generation
http://stylus.github.io/nib
MIT License
1.9k stars 250 forks source link

arrow mixins #176

Closed rhyzx closed 8 years ago

rhyzx commented 11 years ago

border based arrow, support ie6+

arrow-up(size=4px, color=#000)
arrow-down(size=4px, color=#000)
arrow-left(size=4px, color=#000)
arrow-right(size=4px, color=#000)

example

arrow-up(10px, #FFF)

//yields
font: 0/0 undef
width: 0
height: 0
border: 10px solid transparent

_border-color: magenta
_filter: chroma(color=magenta)

border-top: none
border-bottom-color: #FFF

DEMO http://jsfiddle.net/aRDZw/2/

notslang commented 11 years ago

this should probably get some test cases, but other than that, it looks useful