Sha256: dafa5e39a3725f3046e4a0fc11a6e48a77bc60768465f4912d8a8f148d95a30f

Contents?: true

Size: 475 Bytes

Versions: 24

Compression:

Stored size: 475 Bytes

Contents


// ?= 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')

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
stylus-source-0.23.0 vendor/examples/functions.styl
stylus-source-0.22.6 vendor/examples/functions.styl
stylus-source-0.22.5 vendor/examples/functions.styl
stylus-source-0.22.4 vendor/examples/functions.styl
stylus-source-0.22.3 vendor/examples/functions.styl
stylus-source-0.22.2 vendor/examples/functions.styl
stylus-source-0.22.1 vendor/examples/functions.styl
stylus-source-0.22.0 vendor/examples/functions.styl
stylus-source-0.21.2 vendor/examples/functions.styl
stylus-source-0.21.1 vendor/examples/functions.styl
stylus-source-0.21.0 vendor/examples/functions.styl
stylus-source-0.20.1 vendor/examples/functions.styl
stylus-source-0.20.0 vendor/examples/functions.styl
stylus-source-0.19.8 vendor/examples/functions.styl
stylus-source-0.19.7 vendor/examples/functions.styl
stylus-source-0.19.6 vendor/examples/functions.styl
stylus-source-0.19.5 vendor/examples/functions.styl
stylus-source-0.19.4 vendor/examples/functions.styl
stylus-source-0.19.3 vendor/examples/functions.styl
stylus-source-0.19.2 vendor/examples/functions.styl