mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Reversed the order of extract's parameters, to match the precedence set
by other functions. Fixes #1119
This commit is contained in:
@@ -356,7 +356,7 @@ tree.functions = {
|
||||
shade: function(color, amount) {
|
||||
return this.mix(this.rgb(0, 0, 0), color, amount);
|
||||
},
|
||||
extract: function(index, values) {
|
||||
extract: function(values, index) {
|
||||
index = index.value - 1; // (1-based index)
|
||||
return values.value[index];
|
||||
},
|
||||
|
||||
@@ -125,5 +125,5 @@
|
||||
|
||||
#extract {
|
||||
@anon: A B C 1 2 3;
|
||||
result: extract(6, @anon) extract(5, @anon) extract(4, @anon) extract(3, @anon) extract(2, @anon) extract(1, @anon);
|
||||
result: extract(@anon, 6) extract(@anon, 5) extract(@anon, 4) extract(@anon, 3) extract(@anon, 2) extract(@anon, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user