Warning, /webapps/ocs-webserver/library/lessphp/tests/inputs/arity.less is written in an unsupported language. File is not indexed.

0001 
0002 // simple arity
0003 
0004 .hello(@a) {
0005         hello: one;
0006 }
0007 
0008 .hello(@a, @b) {
0009         hello: two;
0010 }
0011 
0012 .hello(@a, @b, @c) {
0013         hello: three;
0014 }
0015 
0016 
0017 .world(@a, @b, @c) {
0018         world: three;
0019 }
0020 
0021 .world(@a, @b) {
0022         world: two;
0023 }
0024 
0025 .world(@a) {
0026         world: one;
0027 }
0028 
0029 .one {
0030         .hello(1);
0031         .world(1);
0032 }
0033 
0034 .two {
0035         .hello(1, 1);
0036         .world(1, 1);
0037 }
0038 
0039 .three {
0040         .hello(1, 1, 1);
0041         .world(1, 1, 1);
0042 }
0043 
0044 
0045 // arity with default values
0046 
0047 .foo(@a, @b: cool) {
0048         foo: two @b;
0049 }
0050 
0051 .foo(@a, @b: cool, @c: yeah) {
0052         foo: three @b @c;
0053 }
0054 
0055 
0056 .baz(@a, @b, @c: yeah) {
0057         baz: three @c;
0058 }
0059 
0060 .baz(@a, @b: cool) {
0061         baz: two @b;
0062 }
0063 
0064 
0065 .multi-foo {
0066         .foo(1);
0067         .foo(1, 1);
0068         .foo(1,1,1);
0069 }
0070 
0071 .multi-baz {
0072         .baz(1);
0073         .baz(1, 1);
0074         .baz(1,1,1);
0075 }
0076 
0077