Sha256: da2dc7bfe617e976c54fcd30c70e1be3477422c7369a70a08ab386a1036ef739

Contents?: true

Size: 1.29 KB

Versions: 24

Compression:

Stored size: 1.29 KB

Contents

body
  // 5px
  foo 0 || 5px

  // 0px
  foo 0px || 5px
  
  // 0px
  foo 0px || 0px
  
  // false
  foo 0 or false
  
  // true
  foo 0 || 0 || true
  
  // 5px
  foo 1px && 5px
  
  // 1px
  foo 0px && 1px
  
  // 0
  foo 1px && 0
  
  // false
  foo 1px and false
  
  // 10
  foo 5px && 5px && 10
  
  // #fff
  foo #000 && #fff
  
  // 1
  foo 8 && (4 && 1)
  
  // true
  type = "color"
  foo #fff is a type
  foo #fff is a 'color'
  
  // false
  foo 15px is a 'color'
  // true
  foo 15px is a 'unit'
  
  // true
  foo 15px is a 'unit' and #fff is a 'color'
  
  // true
  foo = 'bar'
  
  // true
  bar = 'baz'
  foo foo is defined and bar is defined
  
  // false
  foo baz is defined
  
  // wahoo
  foo bar is defined ? wahoo : nope
  
  // nope
  foo rawr is defined ? yes : nope
  
  // "got 15px"
  foo "got " + 15px

  // 1
  foo true and 1 or 5

  // 5
  foo !false and !false and 5
  
  // true
  foo !!5 is true or !!0 is false
  foo !!5 == false or !!0 == false
  
  // true
  foo wahoo == wahoo
  
  // false
  foo 0 == true
  foo true == 0
  foo #fff == undefined


body
  nums = 1 2
  foo: '<%s:%s>' % 12
  foo: '<%s:%s>' % nums
  foo: '<a: %s b: %s>' % 1 2 // not what you might think
  foo: '<a: %s b: %s>' % (1 2)
  foo: 'X::Micrsoft::crap(%s)' % rgb(0,255,0)
  foo: '<%s, %s, %s>' % (foo bar baz)  

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
stylus-source-0.19.1 vendor/test/cases/operators.styl
stylus-source-0.19.0 vendor/test/cases/operators.styl
stylus-source-0.18.0 vendor/test/cases/operators.styl
stylus-source-0.17.0 vendor/test/cases/operators.styl