mirror of
https://github.com/less/less.js.git
synced 2026-01-23 14:18:00 -05:00
30 lines
570 B
Plaintext
30 lines
570 B
Plaintext
.eval {
|
|
js: `42`;
|
|
js: `1 + 1`;
|
|
js: `"hello world"`;
|
|
js: `[1, 2, 3]`;
|
|
title: `typeof process.title`;
|
|
ternary: `(1 + 1 == 2 ? true : false)`;
|
|
multiline: `(function(){var x = 1 + 1;
|
|
return x})()`;
|
|
}
|
|
.scope {
|
|
@foo: 42;
|
|
var: `parseInt(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(', ')`;
|
|
ary1: `@{ary2}.join(', ')`;
|
|
}
|