UNPKG

jade

Version:

Jade template engine

35 lines (27 loc) 498 B
add(a, b) a + b pad(x, y) padding y x y x body pad(5px, 10px) form .button padding-left add(10px, 5px) -opposite-position(pos) if pos == top bottom else if pos == bottom top else if pos == left right else if pos == right left else error('Invalid position ' + pos) opposite(positions) for pos in positions pos = -opposite-position(pos) ret = ret is defined ? ret pos : pos body foo opposite(top) foo opposite(left) foo opposite(top left)