5 @v: abc "abc" 1 1px 1% #123;
7 extract: extract(@v, 1) extract(@v, 2) extract(@v, 3) extract(@v, 4) extract(@v, 5) extract(@v, 6);
19 var-value: extract(@var, 1);
20 var-length: length(@var);
21 ill-index: extract(@var, 2);
23 name-value: extract(name, 1);
24 string-value: extract("string", 1);
25 number-value: extract(12345678, 1);
26 color-value: extract(blue, 1);
27 rgba-value: extract(rgba(80, 160, 240, 0.67), 1);
28 empty-value: extract(~'', 1);
30 name-length: length(name);
31 string-length: length("string");
32 number-length: length(12345678);
33 color-length: length(blue);
34 rgba-length: length(rgba(80, 160, 240, 0.67));
35 empty-length: length(~'');
40 .mixin-args(a, b, c, d);
41 .mixin-args(1; 2; 3; 4);
46 length: length(@value);
47 extract: extract(@value, 3) ~"|" extract(@value, 2) ~"|" extract(@value, 1);
53 length: length(@arguments);
54 extract: extract(@arguments, 3) ~"|" extract(@arguments, 2) ~"|" extract(@arguments, 1);
58 .mixin-args(@values...) {
60 length: length(@values);
61 extract: extract(@values, 3) ~"|" extract(@values, 2) ~"|" extract(@values, 1);
65 .mixin-args(@head, @tail...) {
67 length: length(@tail);
68 extract: extract(@tail, 2) ~"|" extract(@tail, 1);
72 // "multidimensional" array/list
75 @v: a b c, 1 2 3, "x" "y" "z";
77 extract-1: extract(@v, 2);
78 length-2: length(extract(@v, 2));
79 extract-2: extract(extract(@v, 2), 2);
81 &-as-args {.mixin-args(a b c, 1 2 3, "x" "y" "z")}
90 extract-1: extract(@v, 2);
91 length-2: length(extract(@v, 2));
92 extract-2: extract(extract(@v, 2), 2);
94 &-as-args {.mixin-args(@a, @b, @c)}
102 length-1: length(@v);
103 extract-1: extract(@v, 2);
104 length-2: length(extract(@v, 2));
105 extract-2: extract(extract(@v, 2), 2);
107 &-as-args {.mixin-args(@a @b @c)}
111 @a: a b c d, 1 2 3 4;
112 @b: 5 6 7 8, e f g h;
118 length-1: length(@v1);
119 extract-1: extract(@v1, 1);
121 @v2: extract(@v1, 2);
122 length-2: length(@v2);
123 extract-2: extract(@v2, 1);
125 @v3: extract(@v2, 1);
126 length-3: length(@v3);
127 extract-3: extract(@v3, 3);
129 @v4: extract(@v3, 4);
130 length-4: length(@v4);
131 extract-4: extract(@v4, 1);