jade
Version:
Jade template engine
56 lines (38 loc) • 741 B
text/stylus
// color manipulation
body
color darken(#eee, 50%)
color darken-by(#eee, 50%)
color #eee - rgba(100,0,0,0.5)
color rgba(#eee,.5)
// expression node access
body
list = (one 1) (two 2) (three 3)
foo last(list)
// pseudo hashes
get(hash, key)
return pair[1] if pair[0] == key for pair in hash
body
hash = (one 1) (two 2) (three 3)
foo get(hash, two)
foo get(hash, one)
foo get(hash, none) == null
foo length(hash)
// color components
body
foo red(#c00)
foo lightness(#c00)
// units
body
foo unit(15%)
foo unit(15%, px)
foo unit(15px, '%')
// math
body
foo abs(-5)
foo sum(1 2 3 4)
foo avg(1 2 3 4)
// literals
body
foo unquote('X::MessedUp::IE.crap(here)')
// inspection
p(1 + 5 / 10)