jade
Version:
Jade template engine
30 lines (20 loc) • 475 B
text/stylus
// ?= would allow us to define the images global before @importing
// the file if we were to distribute this
images ?= '/images'
image(path)
url(join('/', images path))
// or
image(path)
url(images + '/' + path)
body
background image('foo.png')
// functions can act as both mixins
// or have a return value
image(path)
if mixin
background image(path)
else
url(images + '/' + path)
body
image('something.png')
background image('something.png')