mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
- support for returning Array values - Expressions/Values are passed as arrays to JavaScript - fixed some edge cases
28 lines
483 B
Plaintext
28 lines
483 B
Plaintext
.eval {
|
|
js: `42`;
|
|
js: `1 + 1`;
|
|
js: `"hello world"`;
|
|
js: `[1, 2, 3]`;
|
|
title: `process.title`;
|
|
ternary: `(1 + 1 == 2 ? true : false)`;
|
|
}
|
|
.scope {
|
|
@foo: 42;
|
|
var: `this.foo.toJS()`;
|
|
escaped: ~`2 + 5 + 'px'`;
|
|
}
|
|
.vars {
|
|
@var: `4 + 4`;
|
|
width: @var;
|
|
}
|
|
.escape-interpol {
|
|
@world: "world";
|
|
width: ~`"hello" + " " + @{world}`;
|
|
}
|
|
.arrays {
|
|
@ary: 1, 2, 3;
|
|
@ary2: 1 2 3;
|
|
ary: `@{ary}.join(', ')`;
|
|
ary: `@{ary2}.join(', ')`;
|
|
}
|