diff options
Diffstat (limited to 'vendors/lessphp/tests/inputs/arity.less')
-rw-r--r-- | vendors/lessphp/tests/inputs/arity.less | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/vendors/lessphp/tests/inputs/arity.less b/vendors/lessphp/tests/inputs/arity.less new file mode 100644 index 000000000..a3adad612 --- /dev/null +++ b/vendors/lessphp/tests/inputs/arity.less @@ -0,0 +1,77 @@ + +// simple arity + +.hello(@a) { + color: one; +} + +.hello(@a, @b) { + color: two; +} + +.hello(@a, @b, @c) { + color: three; +} + + +.world(@a, @b, @c) { + color: three; +} + +.world(@a, @b) { + color: two; +} + +.world(@a) { + color: one; +} + +.one { + .hello(1); + .world(1); +} + +.two { + .hello(1, 1); + .world(1, 1); +} + +.three { + .hello(1, 1, 1); + .world(1, 1, 1); +} + + +// arity with default values + +.foo(@a, @b: cool) { + color: two; +} + +.foo(@a, @b: cool, @c: yeah) { + color: three; +} + + +.baz(@a, @b, @c: yeah) { + color: three; +} + +.baz(@a, @b: cool) { + color: two; +} + + +.multi-foo { + .foo(1); + .foo(1, 1); + .foo(1,1,1); +} + +.multi-baz { + .baz(1); + .baz(1, 1); + .baz(1,1,1); +} + + |