stlyus-mixins
Version:
A library of mixins for stylus-lang
21 lines (16 loc) • 481 B
text/stylus
i = !important
/**
* c <foreground> <border-color> <background> <foreground-important> <border-important> <background-important>
* use 0 to omit arguments
*/
c(x, y = 0, z = 0, xi = 0, yi = 0, zi = 0)
if (x is a 'call' || (x is a 'rgba'))
color xi == 0 ? x : x i
if (y is a 'call' || (y is a 'rgba'))
border-color yi == 0 ? y : y i
if (z is a 'call' || (z is a 'rgba'))
background-color zi == 0 ? z : z i
bg()
background arguments
fg()
color arguments