Sha256: 8560e22177a8165005301aab27ed47119c623dd500db4fb11ff5b87f2629be4d

Contents?: true

Size: 1.2 KB

Versions: 24

Compression:

Stored size: 1.2 KB

Contents

body
  // 4
  foo (--- 0) or 4
  // 4
  foo --- 0 or 4
  // -5px
  foo ---5px
  // 2
  foo (!!!5) or 2
  foo !!!5 or 2


body
  // true
  foo !(! 5)
  foo !!5

body
  // 5
  foo (! false) and (! false) and 5
  foo ! false and ! false and 5

body
  // true
  foo (!!5 == true) or (!!0 == false)
  foo !!5 == true or !!0 == false
  foo (!!5 == false) or (!!0 == false)
  foo !!5 == false or !!0 == false
  // 2
  foo 5 < 10 and !!5 and 2

body
  // true
  foo (!!true) and (!!true)
  foo !!true and !!true

body
  test()
    5 * 2 - 15 / 2
  // 2.5
  foo test()
  foo (5 * 2) - (15 / 2)

body
  // true
  foo not 5 < 10 ? 0 : 1
  // true
  foo !(5 < 10 ? 0 : 1)
  // false
  foo !(5 > 10 ? 0 : 1)
  // wahoo
  foo !! 1 ? wahoo : fail
  // fail
  foo !1 ? wahoo : fail

body
  foo = 'test'
  bar = 'test'
  // true
  foo (foo is defined) and (bar is defined)
  foo foo is defined and bar is defined

body
  // true
  foo 5 > 4 is a 'boolean'

  foo = type is a 'unit' ? type : 1
  // 1
  foo foo

body
  padding = false
  margin = false

  // true
  foo !padding or !margin
  foo not padding or margin
  
  // false
  foo not padding or margin == !padding or !margin
  // true
  foo (not padding or margin) == !padding or !margin

Version data entries

24 entries across 24 versions & 1 rubygems

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