├── .npmignore
├── test
├── css
│ ├── charsets.css
│ ├── import-once.css
│ ├── lazy-eval.css
│ ├── import-interpolation.css
│ ├── mixins-closure.css
│ ├── legacy
│ │ └── legacy.css
│ ├── compression
│ │ └── compression.css
│ ├── mixins-nested.css
│ ├── extend-clearfix.css
│ ├── javascript.css
│ ├── extend-media.css
│ ├── ie-filters.css
│ ├── mixins-named-args.css
│ ├── css-escapes.css
│ ├── extend-exact.css
│ ├── scope.css
│ ├── mixins-important.css
│ ├── mixins-pattern.css
│ ├── whitespace.css
│ ├── debug
│ │ ├── linenumbers-comments.css
│ │ ├── linenumbers-mediaquery.css
│ │ └── linenumbers-all.css
│ ├── import.css
│ ├── parens.css
│ ├── extend-chaining.css
│ ├── operations.css
│ ├── strings.css
│ ├── variables.css
│ ├── rulesets.css
│ ├── extend.css
│ ├── comments.css
│ ├── colors.css
│ ├── extend-selector.css
│ ├── mixins-guards.css
│ ├── static-urls
│ │ └── urls.css
│ ├── css.css
│ ├── mixins-args.css
│ ├── urls.css
│ ├── mixins.css
│ ├── selectors.css
│ ├── css-3.css
│ ├── extend-nest.css
│ ├── functions.css
│ └── media.css
├── data
│ ├── image.jpg
│ ├── page.html
│ └── data-uri-fail.png
├── less
│ ├── errors
│ │ ├── parse-error-curly-bracket.less
│ │ ├── bad-variable-declaration1.less
│ │ ├── property-in-root2.less
│ │ ├── add-mixed-units.less
│ │ ├── color-operation-error.less
│ │ ├── divide-mixed-units.less
│ │ ├── import-no-semi.less
│ │ ├── property-in-root.less
│ │ ├── property-in-root3.less
│ │ ├── recursive-variable.less
│ │ ├── comment-in-selector.less
│ │ ├── import-subfolder1.less
│ │ ├── import-subfolder2.less
│ │ ├── extend-no-selector.less
│ │ ├── extend-not-at-end.less
│ │ ├── parens-error-1.less
│ │ ├── parens-error-2.less
│ │ ├── parens-error-3.less
│ │ ├── add-mixed-units2.less
│ │ ├── imports
│ │ │ ├── import-subfolder1.less
│ │ │ ├── import-test.less
│ │ │ ├── import-subfolder2.less
│ │ │ └── subfolder
│ │ │ │ ├── mixin-not-defined.less
│ │ │ │ └── parse-error-curly-bracket.less
│ │ ├── javascript-error.less
│ │ ├── parse-error-missing-bracket.less
│ │ ├── property-ie5-hack.less
│ │ ├── mixin-not-matched.less
│ │ ├── mixin-not-matched2.less
│ │ ├── multiply-mixed-units.less
│ │ ├── import-subfolder2.txt
│ │ ├── parse-error-curly-bracket.txt
│ │ ├── bad-variable-declaration1.txt
│ │ ├── import-no-semi.txt
│ │ ├── parse-error-with-import.txt
│ │ ├── import-missing.less
│ │ ├── mixed-mixin-definition-args-1.less
│ │ ├── comment-in-selector.txt
│ │ ├── import-subfolder1.txt
│ │ ├── mixed-mixin-definition-args-2.less
│ │ ├── mixin-not-defined.txt
│ │ ├── parens-error-2.txt
│ │ ├── parens-error-1.txt
│ │ ├── parens-error-3.txt
│ │ ├── parse-error-missing-bracket.txt
│ │ ├── property-ie5-hack.txt
│ │ ├── color-operation-error.txt
│ │ ├── mixin-not-matched.txt
│ │ ├── recursive-variable.txt
│ │ ├── extend-not-at-end.txt
│ │ ├── mixin-not-matched2.txt
│ │ ├── property-in-root3.txt
│ │ ├── import-missing.txt
│ │ ├── mixin-not-defined.less
│ │ ├── property-in-root.txt
│ │ ├── property-in-root2.txt
│ │ ├── add-mixed-units.txt
│ │ ├── extend-no-selector.txt
│ │ ├── mixed-mixin-definition-args-1.txt
│ │ ├── mixed-mixin-definition-args-2.txt
│ │ ├── parse-error-with-import.less
│ │ ├── add-mixed-units2.txt
│ │ ├── divide-mixed-units.txt
│ │ ├── javascript-error.txt
│ │ └── multiply-mixed-units.txt
│ ├── import
│ │ ├── import-charset-test.less
│ │ ├── import-test-d.css
│ │ ├── import-test-e.less
│ │ ├── deeper
│ │ │ └── import-once-test-a.less
│ │ ├── import-interpolation.less
│ │ ├── import-test-c.less
│ │ ├── urls.less
│ │ ├── import-once-test-c.less
│ │ ├── import-test-a.less
│ │ ├── import-interpolation2.less
│ │ ├── imports
│ │ │ ├── logo.less
│ │ │ └── font.less
│ │ ├── import-test-b.less
│ │ └── import-and-relative-paths-test.less
│ ├── charsets.less
│ ├── lazy-eval.less
│ ├── import-once.less
│ ├── legacy
│ │ └── legacy.less
│ ├── import-interpolation.less
│ ├── debug
│ │ ├── linenumbers.less
│ │ └── import
│ │ │ └── test.less
│ ├── extend-clearfix.less
│ ├── compression
│ │ └── compression.less
│ ├── mixins-nested.less
│ ├── mixins-important.less
│ ├── extend-media.less
│ ├── mixins-closure.less
│ ├── ie-filters.less
│ ├── css-escapes.less
│ ├── rulesets.less
│ ├── mixins-named-args.less
│ ├── javascript.less
│ ├── import.less
│ ├── extend-exact.less
│ ├── whitespace.less
│ ├── extend-nest.less
│ ├── static-urls
│ │ └── urls.less
│ ├── parens.less
│ ├── strings.less
│ ├── extend.less
│ ├── extend-chaining.less
│ ├── operations.less
│ ├── extend-selector.less
│ ├── mixins-pattern.less
│ ├── comments.less
│ ├── variables.less
│ ├── scope.less
│ ├── colors.less
│ ├── urls.less
│ ├── css.less
│ ├── mixins.less
│ ├── selectors.less
│ ├── css-3.less
│ ├── mixins-args.less
│ ├── media.less
│ └── mixins-guards.less
├── browser
│ ├── less
│ │ ├── imports
│ │ │ ├── urls.less
│ │ │ └── urls2.less
│ │ ├── rootpath
│ │ │ └── urls.less
│ │ ├── relative-urls
│ │ │ └── urls.less
│ │ ├── rootpath-relative
│ │ │ └── urls.less
│ │ └── urls.less
│ ├── runner-errors.js
│ ├── runner-relative-urls.js
│ ├── runner-legacy.js
│ ├── runner-rootpath.js
│ ├── runner-production.js
│ ├── runner-browser.js
│ ├── runner-rootpath-relative.js
│ ├── runner-main.js
│ ├── template.htm
│ ├── css
│ │ ├── rootpath
│ │ │ └── urls.css
│ │ ├── rootpath-relative
│ │ │ └── urls.css
│ │ ├── relative-urls
│ │ │ └── urls.css
│ │ └── urls.css
│ └── common.js
└── browser-test-prepare.js
├── .gitignore
├── .gitattributes
├── lib
└── less
│ ├── tree
│ ├── unicode-descriptor.js
│ ├── comment.js
│ ├── paren.js
│ ├── alpha.js
│ ├── keyword.js
│ ├── negative.js
│ ├── assignment.js
│ ├── anonymous.js
│ ├── value.js
│ ├── url.js
│ ├── extend.js
│ ├── variable.js
│ ├── quoted.js
│ ├── directive.js
│ ├── expression.js
│ ├── condition.js
│ ├── operation.js
│ ├── javascript.js
│ ├── selector.js
│ ├── rule.js
│ ├── call.js
│ ├── element.js
│ └── import.js
│ ├── join-selector-visitor.js
│ ├── tree.js
│ ├── visitor.js
│ ├── rhino.js
│ ├── lessc_helper.js
│ ├── env.js
│ └── import-visitor.js
├── README.md
├── benchmark
└── less-benchmark.js
├── package.json
├── Makefile
└── CONTRIBUTING.md
/.npmignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/css/charsets.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
--------------------------------------------------------------------------------
/test/data/image.jpg:
--------------------------------------------------------------------------------
1 | not actually a jpeg file
2 |
--------------------------------------------------------------------------------
/test/less/errors/parse-error-curly-bracket.less:
--------------------------------------------------------------------------------
1 | }}
--------------------------------------------------------------------------------
/test/data/page.html:
--------------------------------------------------------------------------------
1 |
This page is 100% Awesome.
2 |
--------------------------------------------------------------------------------
/test/less/errors/bad-variable-declaration1.less:
--------------------------------------------------------------------------------
1 | @@demo: "hi";
--------------------------------------------------------------------------------
/test/less/import/import-charset-test.less:
--------------------------------------------------------------------------------
1 | @charset "ISO-8859-1";
--------------------------------------------------------------------------------
/test/less/import/import-test-d.css:
--------------------------------------------------------------------------------
1 | #css { color: yellow; }
2 |
--------------------------------------------------------------------------------
/test/css/import-once.css:
--------------------------------------------------------------------------------
1 | #import {
2 | color: #ff0000;
3 | }
4 |
--------------------------------------------------------------------------------
/test/css/lazy-eval.css:
--------------------------------------------------------------------------------
1 | .lazy-eval {
2 | width: 100%;
3 | }
4 |
--------------------------------------------------------------------------------
/test/less/errors/property-in-root2.less:
--------------------------------------------------------------------------------
1 | @import "property-in-root";
--------------------------------------------------------------------------------
/test/less/import/import-test-e.less:
--------------------------------------------------------------------------------
1 |
2 | body { width: 100% }
3 |
--------------------------------------------------------------------------------
/test/less/errors/add-mixed-units.less:
--------------------------------------------------------------------------------
1 | .a {
2 | error: (1px + 3em);
3 | }
--------------------------------------------------------------------------------
/test/less/errors/color-operation-error.less:
--------------------------------------------------------------------------------
1 | .a {
2 | prop: (3 / #fff);
3 | }
--------------------------------------------------------------------------------
/test/less/errors/divide-mixed-units.less:
--------------------------------------------------------------------------------
1 | .a {
2 | error: (1px / 3em);
3 | }
--------------------------------------------------------------------------------
/test/less/errors/import-no-semi.less:
--------------------------------------------------------------------------------
1 | @import "this-statement-is-invalid.less"
--------------------------------------------------------------------------------
/test/less/errors/property-in-root.less:
--------------------------------------------------------------------------------
1 | .a() {
2 | prop:1;
3 | }
4 | .a();
--------------------------------------------------------------------------------
/test/less/errors/property-in-root3.less:
--------------------------------------------------------------------------------
1 | prop:1;
2 | .a {
3 | prop:1;
4 | }
--------------------------------------------------------------------------------
/test/less/errors/recursive-variable.less:
--------------------------------------------------------------------------------
1 | @bodyColor: darken(@bodyColor, 30%);
--------------------------------------------------------------------------------
/test/less/errors/comment-in-selector.less:
--------------------------------------------------------------------------------
1 | #gaga /* Comment */ span { color: red }
--------------------------------------------------------------------------------
/test/less/errors/import-subfolder1.less:
--------------------------------------------------------------------------------
1 | @import "imports/import-subfolder1.less";
--------------------------------------------------------------------------------
/test/less/errors/import-subfolder2.less:
--------------------------------------------------------------------------------
1 | @import "imports/import-subfolder2.less";
--------------------------------------------------------------------------------
/test/less/import/deeper/import-once-test-a.less:
--------------------------------------------------------------------------------
1 | @import "../import-once-test-c";
--------------------------------------------------------------------------------
/test/less/charsets.less:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | @import "import/import-charset-test";
--------------------------------------------------------------------------------
/test/less/errors/extend-no-selector.less:
--------------------------------------------------------------------------------
1 | :extend(.a all) {
2 | property: red;
3 | }
--------------------------------------------------------------------------------
/test/less/errors/extend-not-at-end.less:
--------------------------------------------------------------------------------
1 | .a:extend(.b all).c {
2 | property: red;
3 | }
--------------------------------------------------------------------------------
/test/less/errors/parens-error-1.less:
--------------------------------------------------------------------------------
1 | .a {
2 | something: (12 (13 + 5 -23) + 5);
3 | }
--------------------------------------------------------------------------------
/test/less/errors/parens-error-2.less:
--------------------------------------------------------------------------------
1 | .a {
2 | something: (12 * (13 + 5 -23));
3 | }
--------------------------------------------------------------------------------
/test/less/errors/parens-error-3.less:
--------------------------------------------------------------------------------
1 | .a {
2 | something: (12 + (13 + 10 -23));
3 | }
--------------------------------------------------------------------------------
/test/less/import/import-interpolation.less:
--------------------------------------------------------------------------------
1 | @import "import-@{in}@{terpolation}2.less";
--------------------------------------------------------------------------------
/test/less/errors/add-mixed-units2.less:
--------------------------------------------------------------------------------
1 | .a {
2 | error: ((1px * 2px) + (3em * 3px));
3 | }
--------------------------------------------------------------------------------
/test/less/errors/imports/import-subfolder1.less:
--------------------------------------------------------------------------------
1 | @import "subfolder/mixin-not-defined.less";
--------------------------------------------------------------------------------
/test/less/errors/imports/import-test.less:
--------------------------------------------------------------------------------
1 | .someclass
2 | {
3 | font-weight: bold;
4 | }
--------------------------------------------------------------------------------
/test/less/errors/javascript-error.less:
--------------------------------------------------------------------------------
1 | .scope {
2 | var: `this.foo.toJS()`;
3 | }
4 |
--------------------------------------------------------------------------------
/test/less/errors/parse-error-missing-bracket.less:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #fff;
3 |
--------------------------------------------------------------------------------
/test/less/errors/imports/import-subfolder2.less:
--------------------------------------------------------------------------------
1 | @import "subfolder/parse-error-curly-bracket.less";
--------------------------------------------------------------------------------
/test/less/errors/imports/subfolder/mixin-not-defined.less:
--------------------------------------------------------------------------------
1 | @import "../../mixin-not-defined.less";
--------------------------------------------------------------------------------
/test/less/errors/property-ie5-hack.less:
--------------------------------------------------------------------------------
1 | .test {
2 | display/*/: block; /*sorry for IE5*/
3 | }
--------------------------------------------------------------------------------
/test/less/import/import-test-c.less:
--------------------------------------------------------------------------------
1 |
2 | @c: red;
3 |
4 | #import {
5 | color: @c;
6 | }
7 |
--------------------------------------------------------------------------------
/test/less/import/urls.less:
--------------------------------------------------------------------------------
1 | // empty file showing that it loads from the relative path first
2 |
--------------------------------------------------------------------------------
/test/css/import-interpolation.css:
--------------------------------------------------------------------------------
1 | body {
2 | width: 100%;
3 | }
4 | .a {
5 | var: test;
6 | }
7 |
--------------------------------------------------------------------------------
/test/less/import/import-once-test-c.less:
--------------------------------------------------------------------------------
1 |
2 | @c: red;
3 |
4 | #import {
5 | color: @c;
6 | }
7 |
--------------------------------------------------------------------------------
/test/less/import/import-test-a.less:
--------------------------------------------------------------------------------
1 | @import "import-test-b.less";
2 | @a: 20%;
3 | @import "urls.less";
--------------------------------------------------------------------------------
/test/less/lazy-eval.less:
--------------------------------------------------------------------------------
1 | @var: @a;
2 | @a: 100%;
3 |
4 | .lazy-eval {
5 | width: @var;
6 | }
7 |
--------------------------------------------------------------------------------
/test/data/data-uri-fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/siddii/less.js/master/test/data/data-uri-fail.png
--------------------------------------------------------------------------------
/test/browser/less/imports/urls.less:
--------------------------------------------------------------------------------
1 | @import "modify-this.css";
2 | .modify {
3 | my-url: url("a.png");
4 | }
--------------------------------------------------------------------------------
/test/browser/less/imports/urls2.less:
--------------------------------------------------------------------------------
1 | @import "modify-again.css";
2 | .modify {
3 | my-url: url("b.png");
4 | }
--------------------------------------------------------------------------------
/test/less/errors/imports/subfolder/parse-error-curly-bracket.less:
--------------------------------------------------------------------------------
1 | @import "../../parse-error-curly-bracket.less";
--------------------------------------------------------------------------------
/test/less/import/import-interpolation2.less:
--------------------------------------------------------------------------------
1 | .a {
2 | var: test;
3 | }
4 |
5 | @in: "redefined-does-nothing";
--------------------------------------------------------------------------------
/test/less/errors/mixin-not-matched.less:
--------------------------------------------------------------------------------
1 | @saxofon:trumpete;
2 |
3 | .mixin(saxofon) {
4 | }
5 |
6 | .mixin(@saxofon);
--------------------------------------------------------------------------------
/test/less/errors/mixin-not-matched2.less:
--------------------------------------------------------------------------------
1 | @saxofon:trumpete;
2 |
3 | .mixin(@a, @b) {
4 | }
5 |
6 | .mixin(@a: @saxofon);
--------------------------------------------------------------------------------
/test/less/errors/multiply-mixed-units.less:
--------------------------------------------------------------------------------
1 | /* Test */
2 | #blah {
3 | // blah
4 | }
5 | .a {
6 | error: (1px * 1em);
7 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .emacs*
3 | *.flymake
4 | *~
5 | .#*
6 | .idea
7 | test/browser/less.js
8 | test/browser/test-runner-*.htm
9 |
--------------------------------------------------------------------------------
/test/less/import/imports/logo.less:
--------------------------------------------------------------------------------
1 | #logo {
2 | width: 100px;
3 | height: 100px;
4 | background: url('../assets/logo.png');
5 | }
6 |
--------------------------------------------------------------------------------
/test/less/errors/import-subfolder2.txt:
--------------------------------------------------------------------------------
1 | ParseError: missing opening `{` in {path}parse-error-curly-bracket.less on line 1, column 2:
2 | 1 }}
3 |
--------------------------------------------------------------------------------
/test/less/import/import-test-b.less:
--------------------------------------------------------------------------------
1 | @import "import-test-c";
2 |
3 | @b: 100%;
4 |
5 | .mixin {
6 | height: 10px;
7 | color: @c;
8 | }
9 |
--------------------------------------------------------------------------------
/test/browser/runner-errors.js:
--------------------------------------------------------------------------------
1 | less.strictUnits = true;
2 |
3 | describe("less.js error tests", function() {
4 | testLessErrorsInDocument();
5 | });
--------------------------------------------------------------------------------
/test/less/errors/parse-error-curly-bracket.txt:
--------------------------------------------------------------------------------
1 | ParseError: missing opening `{` in {path}parse-error-curly-bracket.less on line 1, column 2:
2 | 1 }}
3 |
--------------------------------------------------------------------------------
/test/css/mixins-closure.css:
--------------------------------------------------------------------------------
1 | .class {
2 | width: 99px;
3 | }
4 | .overwrite {
5 | width: 99px;
6 | }
7 | .nested .class {
8 | width: 5px;
9 | }
10 |
--------------------------------------------------------------------------------
/test/less/errors/bad-variable-declaration1.txt:
--------------------------------------------------------------------------------
1 | ParseError: Unrecognised input in {path}bad-variable-declaration1.less on line 1, column 1:
2 | 1 @@demo: "hi";
3 |
--------------------------------------------------------------------------------
/test/less/errors/import-no-semi.txt:
--------------------------------------------------------------------------------
1 | ParseError: Unrecognised input in {path}import-no-semi.less on line 1, column 1:
2 | 1 @import "this-statement-is-invalid.less"
3 |
--------------------------------------------------------------------------------
/test/less/errors/parse-error-with-import.txt:
--------------------------------------------------------------------------------
1 | ParseError: Unrecognised input in {path}parse-error-with-import.less on line 8, column 9:
2 | 7
3 | 8 nonsense;
4 | 9
5 |
--------------------------------------------------------------------------------
/test/browser/runner-relative-urls.js:
--------------------------------------------------------------------------------
1 | less.relativeUrls = true;
2 | describe("less.js browser test - relative url's", function() {
3 | testLessEqualsInDocument();
4 | });
--------------------------------------------------------------------------------
/test/less/errors/import-missing.less:
--------------------------------------------------------------------------------
1 | .a {
2 | color: green;
3 | // tests line number for import reference is correct
4 | }
5 |
6 | @import "file-does-not-exist.less";
--------------------------------------------------------------------------------
/test/less/errors/mixed-mixin-definition-args-1.less:
--------------------------------------------------------------------------------
1 | .mixin(@a : 4, @b : 3, @c: 2) {
2 | will: fail;
3 | }
4 | .mixin-test {
5 | .mixin(@a: 5; @b: 6, @c: 7);
6 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js text eol=lf
2 | lessc text eol=lf
3 | *.less text eol=lf
4 | *.css text eol=lf
5 | *.htm text eol=lf
6 |
7 | *.jpg binary
8 | *.png binary
9 | *.jpeg binary
--------------------------------------------------------------------------------
/test/less/errors/comment-in-selector.txt:
--------------------------------------------------------------------------------
1 | ParseError: Unrecognised input in {path}comment-in-selector.less on line 1, column 21:
2 | 1 #gaga /* Comment */ span { color: red }
3 |
--------------------------------------------------------------------------------
/test/less/errors/import-subfolder1.txt:
--------------------------------------------------------------------------------
1 | NameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less on line 11, column 1:
2 | 10
3 | 11 .mixin-not-defined();
4 |
--------------------------------------------------------------------------------
/test/less/errors/mixed-mixin-definition-args-2.less:
--------------------------------------------------------------------------------
1 | .mixin(@a : 4, @b : 3, @c: 2) {
2 | will: fail;
3 | }
4 | .mixin-test {
5 | .mixin(@a: 5, @b: 6; @c: 7);
6 | }
7 |
--------------------------------------------------------------------------------
/test/less/errors/mixin-not-defined.txt:
--------------------------------------------------------------------------------
1 | NameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less on line 11, column 1:
2 | 10
3 | 11 .mixin-not-defined();
4 |
--------------------------------------------------------------------------------
/test/browser/runner-legacy.js:
--------------------------------------------------------------------------------
1 | less.strictMath = false;
2 | less.strictUnits = false;
3 |
4 | describe("less.js legacy tests", function() {
5 | testLessEqualsInDocument();
6 | });
--------------------------------------------------------------------------------
/test/less/errors/parens-error-2.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: expected ')' got '-' in {path}parens-error-2.less on line 2, column 28:
2 | 1 .a {
3 | 2 something: (12 * (13 + 5 -23));
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/browser/runner-rootpath.js:
--------------------------------------------------------------------------------
1 | less.rootpath = "https://www.github.com/";
2 | describe("less.js browser test - rootpath url's", function() {
3 | testLessEqualsInDocument();
4 | });
--------------------------------------------------------------------------------
/test/less/errors/parens-error-1.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: expected ')' got '(' in {path}parens-error-1.less on line 2, column 18:
2 | 1 .a {
3 | 2 something: (12 (13 + 5 -23) + 5);
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/less/errors/parens-error-3.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: expected ')' got '-' in {path}parens-error-3.less on line 2, column 29:
2 | 1 .a {
3 | 2 something: (12 + (13 + 10 -23));
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/less/errors/parse-error-missing-bracket.txt:
--------------------------------------------------------------------------------
1 | ParseError: missing closing `}` in {path}parse-error-missing-bracket.less on line 3, column 1:
2 | 2 background-color: #fff;
3 | 3
4 |
--------------------------------------------------------------------------------
/test/less/import/import-and-relative-paths-test.less:
--------------------------------------------------------------------------------
1 | @import "../css/background.css";
2 | @import "import-test-d.css";
3 |
4 | @import "imports/logo";
5 | @import "imports/font";
6 |
7 |
--------------------------------------------------------------------------------
/test/less/import/imports/font.less:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: xecret;
3 | src: url('../assets/xecret.ttf');
4 | }
5 |
6 | #secret {
7 | font-family: xecret, sans-serif;
8 | }
9 |
--------------------------------------------------------------------------------
/test/less/errors/property-ie5-hack.txt:
--------------------------------------------------------------------------------
1 | ParseError: Unrecognised input in {path}property-ie5-hack.less on line 2, column 3:
2 | 1 .test {
3 | 2 display/*/: block; /*sorry for IE5*/
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/css/legacy/legacy.css:
--------------------------------------------------------------------------------
1 | @media (-o-min-device-pixel-ratio: 2/1) {
2 | .test-math-and-units {
3 | font: ignores 0/0 rules;
4 | test-division: 7em;
5 | simple: 2px;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/test/less/errors/color-operation-error.txt:
--------------------------------------------------------------------------------
1 | OperationError: Can't substract or divide a color from a number in {path}color-operation-error.less on line null, column 0:
2 | 1 prop: (3 / #fff);
3 |
--------------------------------------------------------------------------------
/test/less/errors/mixin-not-matched.txt:
--------------------------------------------------------------------------------
1 | RuntimeError: No matching definition was found for `.mixin(trumpete)` in {path}mixin-not-matched.less on line 6, column 1:
2 | 5
3 | 6 .mixin(@saxofon);
4 |
--------------------------------------------------------------------------------
/test/less/errors/recursive-variable.txt:
--------------------------------------------------------------------------------
1 | NameError: Recursive variable definition for @bodyColor in {path}recursive-variable.less on line 1, column 20:
2 | 1 @bodyColor: darken(@bodyColor, 30%);
3 |
--------------------------------------------------------------------------------
/test/less/import-once.less:
--------------------------------------------------------------------------------
1 | @import "import/import-once-test-c";
2 | @import "import/import-once-test-c";
3 | @import "import/import-once-test-c.less";
4 | @import "import/deeper/import-once-test-a";
5 |
--------------------------------------------------------------------------------
/test/less/errors/extend-not-at-end.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Extend can only be used at the end of selector in {path}extend-not-at-end.less on line 1, column 21:
2 | 1 .a:extend(.b all).c {
3 | 2 property: red;
4 |
--------------------------------------------------------------------------------
/test/less/errors/mixin-not-matched2.txt:
--------------------------------------------------------------------------------
1 | RuntimeError: No matching definition was found for `.mixin(@a:trumpete)` in {path}mixin-not-matched2.less on line 6, column 1:
2 | 5
3 | 6 .mixin(@a: @saxofon);
4 |
--------------------------------------------------------------------------------
/test/less/errors/property-in-root3.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root3.less on line 1, column 1:
2 | 1 prop:1;
3 | 2 .a {
4 |
--------------------------------------------------------------------------------
/test/less/legacy/legacy.less:
--------------------------------------------------------------------------------
1 | @media (-o-min-device-pixel-ratio: 2/1) {
2 | .test-math-and-units {
3 | font: ignores 0/0 rules;
4 | test-division: 4 / 2 + 5em;
5 | simple: 1px + 1px;
6 | }
7 | }
--------------------------------------------------------------------------------
/test/css/compression/compression.css:
--------------------------------------------------------------------------------
1 | #colours{color1:#fea;color2:#fea;color3:rgba(255,238,170,0.1);string:"#ffeeaa"}
2 | dimensions{val:.1px;val:0;val:4cm;val:.2;val:5;angles-must-have-unit:0deg;width:auto\9}
3 |
--------------------------------------------------------------------------------
/test/less/errors/import-missing.txt:
--------------------------------------------------------------------------------
1 | FileError: '{pathhref}file-does-not-exist.less' wasn't found{404status} in {path}import-missing.less on line 6, column 1:
2 | 5
3 | 6 @import "file-does-not-exist.less";
4 |
--------------------------------------------------------------------------------
/test/less/errors/mixin-not-defined.less:
--------------------------------------------------------------------------------
1 |
2 | .error-is-further-on() {
3 | }
4 |
5 | .pad-here-to-reproduce-error-in() {
6 | }
7 |
8 | .the-import-subfolder-test() {
9 | }
10 |
11 | .mixin-not-defined();
--------------------------------------------------------------------------------
/test/less/errors/property-in-root.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root.less on line 2, column 3:
2 | 1 .a() {
3 | 2 prop:1;
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/less/errors/property-in-root2.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: properties must be inside selector blocks, they cannot be in the root. in {path}property-in-root.less on line 2, column 3:
2 | 1 .a() {
3 | 2 prop:1;
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/less/import-interpolation.less:
--------------------------------------------------------------------------------
1 | @my_theme: "test";
2 |
3 | @import "import/import-@{my_theme}-e.less";
4 |
5 | @import "import/import-@{in}@{terpolation}.less";
6 |
7 | @in: "in";
8 | @terpolation: "terpolation";
--------------------------------------------------------------------------------
/test/less/errors/add-mixed-units.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less on line null, column 0:
2 | 1 error: (1px + 3em);
3 |
--------------------------------------------------------------------------------
/test/less/errors/extend-no-selector.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Extend must be used to extend a selector, it cannot be used on its own in {path}extend-no-selector.less on line 1, column 17:
2 | 1 :extend(.a all) {
3 | 2 property: red;
4 |
--------------------------------------------------------------------------------
/test/less/errors/mixed-mixin-definition-args-1.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-1.less on line 5, column 30:
2 | 4 .mixin-test {
3 | 5 .mixin(@a: 5; @b: 6, @c: 7);
4 | 6 }
5 |
--------------------------------------------------------------------------------
/test/less/errors/mixed-mixin-definition-args-2.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Cannot mix ; and , as delimiter types in {path}mixed-mixin-definition-args-2.less on line 5, column 26:
2 | 4 .mixin-test {
3 | 5 .mixin(@a: 5, @b: 6; @c: 7);
4 | 6 }
5 |
--------------------------------------------------------------------------------
/test/less/errors/parse-error-with-import.less:
--------------------------------------------------------------------------------
1 | @import 'import/import-test.less';
2 |
3 | body
4 | {
5 | font-family: arial, sans-serif;
6 | }
7 |
8 | nonsense;
9 |
10 | .clickable
11 | {
12 | cursor: pointer;
13 | }
--------------------------------------------------------------------------------
/test/browser/runner-production.js:
--------------------------------------------------------------------------------
1 | less.env = "production";
2 |
3 | describe("less.js production behaviour", function() {
4 | it("doesn't log any messages", function() {
5 | expect(logMessages.length).toEqual(0);
6 | });
7 | });
--------------------------------------------------------------------------------
/test/less/errors/add-mixed-units2.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px*px' and 'em*px'. in {path}add-mixed-units2.less on line null, column 0:
2 | 1 error: ((1px * 2px) + (3em * 3px));
3 |
--------------------------------------------------------------------------------
/test/less/errors/divide-mixed-units.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: px/em in {path}divide-mixed-units.less on line 2, column 3:
2 | 1 .a {
3 | 2 error: (1px / 3em);
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/less/errors/javascript-error.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: JavaScript evaluation error: 'TypeError: Cannot call method 'toJS' of undefined' in {path}javascript-error.less on line 2, column 27:
2 | 1 .scope {
3 | 2 var: `this.foo.toJS()`;
4 | 3 }
5 |
--------------------------------------------------------------------------------
/test/browser/runner-browser.js:
--------------------------------------------------------------------------------
1 | describe("less.js browser behaviour", function() {
2 | testLessEqualsInDocument();
3 |
4 | it("has some log messages", function() {
5 | expect(logMessages.length).toBeGreaterThan(0);
6 | });
7 | });
--------------------------------------------------------------------------------
/test/less/errors/multiply-mixed-units.txt:
--------------------------------------------------------------------------------
1 | SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: em*px in {path}multiply-mixed-units.less on line 6, column 3:
2 | 5 .a {
3 | 6 error: (1px * 1em);
4 | 7 }
5 |
--------------------------------------------------------------------------------
/test/browser/runner-rootpath-relative.js:
--------------------------------------------------------------------------------
1 | less.rootpath = "https://www.github.com/cloudhead/less.js/";
2 | less.relativeUrls = true;
3 | describe("less.js browser test - rootpath and relative url's", function() {
4 | testLessEqualsInDocument();
5 | });
--------------------------------------------------------------------------------
/test/css/mixins-nested.css:
--------------------------------------------------------------------------------
1 | .class .inner {
2 | height: 300;
3 | }
4 | .class .inner .innest {
5 | width: 30;
6 | border-width: 60;
7 | }
8 | .class2 .inner {
9 | height: 600;
10 | }
11 | .class2 .inner .innest {
12 | width: 60;
13 | border-width: 120;
14 | }
15 |
--------------------------------------------------------------------------------
/test/css/extend-clearfix.css:
--------------------------------------------------------------------------------
1 | .clearfix,
2 | .foo,
3 | .bar {
4 | *zoom: 1;
5 | }
6 | .clearfix:after,
7 | .foo:after,
8 | .bar:after {
9 | content: '';
10 | display: block;
11 | clear: both;
12 | height: 0;
13 | }
14 | .foo {
15 | color: red;
16 | }
17 | .bar {
18 | color: blue;
19 | }
20 |
--------------------------------------------------------------------------------
/test/less/debug/linenumbers.less:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | @import "import/test.less";
4 |
5 | .start() {
6 | .test2 {
7 | color: red;
8 | }
9 | }
10 |
11 | .mix() {
12 | color: black;
13 | }
14 |
15 | .test1 {
16 | .mix();
17 | }
18 |
19 | .start();
20 |
21 | .mixin_import1();
22 |
23 | .mixin_import2();
--------------------------------------------------------------------------------
/test/less/extend-clearfix.less:
--------------------------------------------------------------------------------
1 | .clearfix {
2 | *zoom: 1;
3 | &:after {
4 | content: '';
5 | display: block;
6 | clear: both;
7 | height: 0;
8 | }
9 | }
10 |
11 | .foo {
12 | &:extend(.clearfix all);
13 | color: red;
14 | }
15 |
16 | .bar {
17 | &:extend(.clearfix all);
18 | color: blue;
19 | }
20 |
--------------------------------------------------------------------------------
/test/less/compression/compression.less:
--------------------------------------------------------------------------------
1 | #colours {
2 | color1: #fea;
3 | color2: #ffeeaa;
4 | color3: rgba(255, 238, 170, 0.1);
5 | @color1: #fea;
6 | string: "@{color1}";
7 | }
8 | dimensions {
9 | val: 0.1px;
10 | val: 0em;
11 | val: 4cm;
12 | val: 0.2;
13 | val: 5;
14 | angles-must-have-unit: 0deg;
15 | width: auto\9;
16 | }
--------------------------------------------------------------------------------
/test/less/mixins-nested.less:
--------------------------------------------------------------------------------
1 | .mix-inner (@var) {
2 | border-width: @var;
3 | }
4 |
5 | .mix (@a: 10) {
6 | .inner {
7 | height: (@a * 10);
8 |
9 | .innest {
10 | width: @a;
11 | .mix-inner((@a * 2));
12 | }
13 | }
14 | }
15 |
16 | .class {
17 | .mix(30);
18 | }
19 |
20 | .class2 {
21 | .mix(60);
22 | }
23 |
--------------------------------------------------------------------------------
/lib/less/tree/unicode-descriptor.js:
--------------------------------------------------------------------------------
1 | (function (tree) {
2 |
3 | tree.UnicodeDescriptor = function (value) {
4 | this.value = value;
5 | };
6 | tree.UnicodeDescriptor.prototype = {
7 | type: "UnicodeDescriptor",
8 | toCSS: function (env) {
9 | return this.value;
10 | },
11 | eval: function () { return this }
12 | };
13 |
14 | })(require('../tree'));
15 |
--------------------------------------------------------------------------------
/test/css/javascript.css:
--------------------------------------------------------------------------------
1 | .eval {
2 | js: 42;
3 | js: 2;
4 | js: "hello world";
5 | js: 1, 2, 3;
6 | title: "string";
7 | ternary: true;
8 | multiline: 2;
9 | }
10 | .scope {
11 | var: 42;
12 | escaped: 7px;
13 | }
14 | .vars {
15 | width: 8;
16 | }
17 | .escape-interpol {
18 | width: hello world;
19 | }
20 | .arrays {
21 | ary: "1, 2, 3";
22 | ary1: "1, 2, 3";
23 | }
24 |
--------------------------------------------------------------------------------
/test/less/mixins-important.less:
--------------------------------------------------------------------------------
1 |
2 | .mixin (9) {
3 | border: 9 !important;
4 | }
5 | .mixin (@a: 0) {
6 | border: @a;
7 | boxer: @a;
8 | .inner {
9 | test: @a;
10 | }
11 | // comment
12 | }
13 |
14 | .class {
15 | .mixin(1);
16 | .mixin(2) !important;
17 | .mixin(3);
18 | .mixin(4) !important;
19 | .mixin(5);
20 | .mixin !important;
21 | .mixin(9);
22 | }
23 |
--------------------------------------------------------------------------------
/lib/less/tree/comment.js:
--------------------------------------------------------------------------------
1 | (function (tree) {
2 |
3 | tree.Comment = function (value, silent) {
4 | this.value = value;
5 | this.silent = !!silent;
6 | };
7 | tree.Comment.prototype = {
8 | type: "Comment",
9 | toCSS: function (env) {
10 | return env.compress ? '' : this.value;
11 | },
12 | eval: function () { return this }
13 | };
14 |
15 | })(require('../tree'));
16 |
--------------------------------------------------------------------------------
/test/less/extend-media.less:
--------------------------------------------------------------------------------
1 | .ext1 .ext2 {
2 | background: black;
3 | }
4 |
5 | @media tv {
6 | .ext1 .ext3 {
7 | color: white;
8 | }
9 | .tv-lowres :extend(.ext1 all) {
10 | background: blue;
11 | }
12 | @media hires {
13 | .ext1 .ext4 {
14 | color: green;
15 | }
16 | .tv-hires :extend(.ext1 all) {
17 | background: red;
18 | }
19 | }
20 | }
21 |
22 | .all:extend(.ext1 all) {
23 |
24 | }
--------------------------------------------------------------------------------
/test/less/mixins-closure.less:
--------------------------------------------------------------------------------
1 | .scope {
2 | @var: 99px;
3 | .mixin () {
4 | width: @var;
5 | }
6 | }
7 |
8 | .class {
9 | .scope > .mixin;
10 | }
11 |
12 | .overwrite {
13 | @var: 0px;
14 | .scope > .mixin;
15 | }
16 |
17 | .nested {
18 | @var: 5px;
19 | .mixin () {
20 | width: @var;
21 | }
22 | .class {
23 | @var: 10px;
24 | .mixin;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/test/css/extend-media.css:
--------------------------------------------------------------------------------
1 | .ext1 .ext2,
2 | .all .ext2 {
3 | background: black;
4 | }
5 | @media tv {
6 | .ext1 .ext3,
7 | .tv-lowres .ext3,
8 | .all .ext3 {
9 | color: white;
10 | }
11 | .tv-lowres {
12 | background: blue;
13 | }
14 | }
15 | @media tv and hires {
16 | .ext1 .ext4,
17 | .tv-hires .ext4,
18 | .all .ext4 {
19 | color: green;
20 | }
21 | .tv-hires {
22 | background: red;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/test/css/ie-filters.css:
--------------------------------------------------------------------------------
1 | .nav {
2 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20);
3 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
4 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr="#000000", GradientType=0);
5 | }
6 | .evalTest1 {
7 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30);
8 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=5);
9 | }
10 |
--------------------------------------------------------------------------------
/test/browser/runner-main.js:
--------------------------------------------------------------------------------
1 | less.functions = {
2 | add: function (a, b) {
3 | return new(less.tree.Dimension)(a.value + b.value);
4 | },
5 | increment: function (a) {
6 | return new(less.tree.Dimension)(a.value + 1);
7 | },
8 | _color: function (str) {
9 | if (str.value === "evil red") { return new(less.tree.Color)("600") }
10 | }
11 | };
12 |
13 | describe("less.js main tests", function() {
14 | testLessEqualsInDocument();
15 | });
--------------------------------------------------------------------------------
/test/less/debug/import/test.less:
--------------------------------------------------------------------------------
1 | @charset "ISO-8859-1";
2 |
3 | .mixin_import1() {
4 | @media all {
5 | .tst {
6 | color: black;
7 | @media screen {
8 | color: red;
9 | .tst3 {
10 | color: white;
11 | }
12 | }
13 | }
14 | }
15 | }
16 |
17 | .mixin_import2() {
18 | .tst2 {
19 | color: white;
20 | }
21 | }
22 |
23 | .tst3 {
24 | color: grey;
25 | }
--------------------------------------------------------------------------------
/test/css/mixins-named-args.css:
--------------------------------------------------------------------------------
1 | .named-arg {
2 | color: blue;
3 | width: 5px;
4 | height: 99%;
5 | args: 1px 100%;
6 | text-align: center;
7 | }
8 | .class {
9 | width: 5px;
10 | height: 19%;
11 | args: 1px 20%;
12 | }
13 | .all-args-wrong-args {
14 | width: 10px;
15 | height: 9%;
16 | args: 2px 10%;
17 | }
18 | .named-args2 {
19 | width: 15px;
20 | height: 49%;
21 | color: #646464;
22 | }
23 | .named-args3 {
24 | width: 5px;
25 | height: 29%;
26 | color: #123456;
27 | }
28 |
--------------------------------------------------------------------------------
/test/less/ie-filters.less:
--------------------------------------------------------------------------------
1 | @fat: 0;
2 | @cloudhead: "#000000";
3 |
4 | .nav {
5 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 20);
6 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@fat);
7 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#333333", endColorstr=@cloudhead, GradientType=@fat);
8 | }
9 | .evalTest(@arg) {
10 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=@arg);
11 | }
12 | .evalTest1 {
13 | .evalTest(30);
14 | .evalTest(5);
15 | }
--------------------------------------------------------------------------------
/test/browser/template.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |