less 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/less/js/.gitignore +7 -0
- data/lib/less/js/.npmignore +1 -0
- data/lib/less/js/CHANGELOG.md +118 -0
- data/lib/less/js/CONTRIBUTING.md +50 -0
- data/lib/less/js/Makefile +14 -2
- data/lib/less/js/bin/lessc +72 -21
- data/lib/less/js/dist/less-1.3.1.js +4011 -0
- data/lib/less/js/dist/less-1.3.1.min.js +9 -0
- data/lib/less/js/dist/less-1.3.2.js +4401 -0
- data/lib/less/js/dist/less-1.3.2.min.js +9 -0
- data/lib/less/js/dist/less-1.3.3.js +4413 -0
- data/lib/less/js/dist/less-1.3.3.min.js +9 -0
- data/lib/less/js/dist/less-rhino-1.3.1.js +3725 -0
- data/lib/less/js/dist/less-rhino-1.3.2.js +3990 -0
- data/lib/less/js/dist/less-rhino-1.3.3.js +4002 -0
- data/lib/less/js/lib/less/browser.js +192 -53
- data/lib/less/js/lib/less/colors.js +1 -0
- data/lib/less/js/lib/less/functions.js +159 -10
- data/lib/less/js/lib/less/index.js +124 -56
- data/lib/less/js/lib/less/lessc_helper.js +62 -0
- data/lib/less/js/lib/less/parser.js +352 -135
- data/lib/less/js/lib/less/rhino.js +84 -23
- data/lib/less/js/lib/less/tree.js +28 -0
- data/lib/less/js/lib/less/tree/anonymous.js +15 -1
- data/lib/less/js/lib/less/tree/assignment.js +3 -1
- data/lib/less/js/lib/less/tree/call.js +12 -6
- data/lib/less/js/lib/less/tree/color.js +10 -0
- data/lib/less/js/lib/less/tree/dimension.js +3 -1
- data/lib/less/js/lib/less/tree/directive.js +9 -5
- data/lib/less/js/lib/less/tree/element.js +8 -6
- data/lib/less/js/lib/less/tree/import.js +16 -13
- data/lib/less/js/lib/less/tree/media.js +16 -9
- data/lib/less/js/lib/less/tree/mixin.js +123 -46
- data/lib/less/js/lib/less/tree/operation.js +5 -0
- data/lib/less/js/lib/less/tree/quoted.js +15 -1
- data/lib/less/js/lib/less/tree/ratio.js +13 -0
- data/lib/less/js/lib/less/tree/rule.js +7 -0
- data/lib/less/js/lib/less/tree/ruleset.js +232 -34
- data/lib/less/js/lib/less/tree/selector.js +21 -11
- data/lib/less/js/lib/less/tree/unicode-descriptor.js +13 -0
- data/lib/less/js/lib/less/tree/url.js +16 -14
- data/lib/less/js/lib/less/tree/variable.js +13 -1
- data/lib/less/js/package.json +13 -3
- data/lib/less/js/test/browser-test-prepare.js +29 -0
- data/lib/less/js/test/browser/common.js +74 -0
- data/lib/less/js/test/browser/css/relative-urls/urls.css +36 -0
- data/lib/less/js/test/browser/css/rootpath-relative/urls.css +36 -0
- data/lib/less/js/test/browser/css/rootpath/urls.css +36 -0
- data/lib/less/js/test/browser/css/urls.css +36 -0
- data/lib/less/js/test/browser/jasmine-html.js +681 -0
- data/lib/less/js/test/browser/jasmine.css +82 -0
- data/lib/less/js/test/browser/jasmine.js +2600 -0
- data/lib/less/js/test/browser/less/imports/urls.less +4 -0
- data/lib/less/js/test/browser/less/imports/urls2.less +4 -0
- data/lib/less/js/test/browser/less/relative-urls/urls.less +33 -0
- data/lib/less/js/test/browser/less/rootpath-relative/urls.less +33 -0
- data/lib/less/js/test/browser/less/rootpath/urls.less +33 -0
- data/lib/less/js/test/browser/less/urls.less +33 -0
- data/lib/less/js/test/browser/phantom-runner.js +139 -0
- data/lib/less/js/test/browser/runner-browser.js +3 -0
- data/lib/less/js/test/browser/runner-main.js +15 -0
- data/lib/less/js/test/browser/runner-relative-urls.js +4 -0
- data/lib/less/js/test/browser/runner-rootpath-relative.js +5 -0
- data/lib/less/js/test/browser/runner-rootpath.js +4 -0
- data/lib/less/js/test/browser/template.htm +10 -0
- data/lib/less/js/test/css/charsets.css +1 -0
- data/lib/less/js/test/css/colors.css +22 -0
- data/lib/less/js/test/css/comments.css +7 -0
- data/lib/less/js/test/css/css-3.css +57 -2
- data/lib/less/js/test/css/css-escapes.css +4 -0
- data/lib/less/js/test/css/css.css +11 -11
- data/lib/less/js/test/css/debug/linenumbers-all.css +43 -0
- data/lib/less/js/test/css/debug/linenumbers-comments.css +35 -0
- data/lib/less/js/test/css/debug/linenumbers-mediaquery.css +35 -0
- data/lib/less/js/test/css/functions.css +59 -2
- data/lib/less/js/test/css/ie-filters.css +7 -3
- data/lib/less/js/test/css/import-once.css +3 -0
- data/lib/less/js/test/css/import.css +7 -9
- data/lib/less/js/test/css/javascript.css +3 -2
- data/lib/less/js/test/css/media.css +116 -0
- data/lib/less/js/test/css/mixins-args.css +23 -4
- data/lib/less/js/test/css/mixins-guards.css +13 -0
- data/lib/less/js/test/css/mixins-important.css +21 -0
- data/lib/less/js/test/css/mixins-named-args.css +27 -0
- data/lib/less/js/test/css/mixins.css +50 -0
- data/lib/less/js/test/css/scope.css +20 -0
- data/lib/less/js/test/css/selectors.css +64 -0
- data/lib/less/js/test/css/static-urls/urls.css +42 -0
- data/lib/less/js/test/css/strings.css +2 -2
- data/lib/less/js/test/css/urls.css +42 -0
- data/lib/less/js/test/css/variables.css +0 -1
- data/lib/less/js/test/css/whitespace.css +4 -0
- data/lib/less/js/test/less-test.js +145 -36
- data/lib/less/js/test/less/charsets.less +3 -0
- data/lib/less/js/test/less/colors.less +27 -0
- data/lib/less/js/test/less/comments.less +12 -0
- data/lib/less/js/test/less/css-3.less +54 -6
- data/lib/less/js/test/less/css-escapes.less +6 -1
- data/lib/less/js/test/less/css.less +14 -12
- data/lib/less/js/test/less/debug/import/test.less +25 -0
- data/lib/less/js/test/less/debug/linenumbers.less +23 -0
- data/lib/less/js/test/less/errors/bad-variable-declaration1.less +1 -0
- data/lib/less/js/test/less/errors/bad-variable-declaration1.txt +2 -0
- data/lib/less/js/test/less/errors/comment-in-selector.less +1 -0
- data/lib/less/js/test/less/errors/comment-in-selector.txt +2 -0
- data/lib/less/js/test/less/errors/import-missing.less +1 -0
- data/lib/less/js/test/less/errors/import-missing.txt +3 -0
- data/lib/less/js/test/less/errors/import-no-semi.less +1 -0
- data/lib/less/js/test/less/errors/import-no-semi.txt +2 -0
- data/lib/less/js/test/less/errors/import-subfolder1.less +1 -0
- data/lib/less/js/test/less/errors/import-subfolder1.txt +3 -0
- data/lib/less/js/test/less/errors/import-subfolder2.less +1 -0
- data/lib/less/js/test/less/errors/import-subfolder2.txt +2 -0
- data/lib/less/js/test/less/errors/imports/import-subfolder1.less +1 -0
- data/lib/less/js/test/less/errors/imports/import-subfolder2.less +1 -0
- data/lib/less/js/test/less/errors/imports/import-test.less +4 -0
- data/lib/less/js/test/less/errors/imports/subfolder/mixin-not-defined.less +1 -0
- data/lib/less/js/test/less/errors/imports/subfolder/parse-error-curly-bracket.less +1 -0
- data/lib/less/js/test/less/errors/javascript-error.less +3 -0
- data/lib/less/js/test/less/errors/javascript-error.txt +4 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-1.less +6 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-1.txt +4 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-2.less +6 -0
- data/lib/less/js/test/less/errors/mixed-mixin-definition-args-2.txt +4 -0
- data/lib/less/js/test/less/errors/mixin-not-defined.less +11 -0
- data/lib/less/js/test/less/errors/mixin-not-defined.txt +3 -0
- data/lib/less/js/test/less/errors/mixin-not-matched.less +6 -0
- data/lib/less/js/test/less/errors/mixin-not-matched.txt +3 -0
- data/lib/less/js/test/less/errors/mixin-not-matched2.less +6 -0
- data/lib/less/js/test/less/errors/mixin-not-matched2.txt +3 -0
- data/lib/less/js/test/less/errors/parse-error-curly-bracket.less +1 -0
- data/lib/less/js/test/less/errors/parse-error-curly-bracket.txt +2 -0
- data/lib/less/js/test/less/errors/parse-error-missing-bracket.less +2 -0
- data/lib/less/js/test/less/errors/parse-error-missing-bracket.txt +2 -0
- data/lib/less/js/test/less/errors/parse-error-with-import.less +13 -0
- data/lib/less/js/test/less/errors/parse-error-with-import.txt +4 -0
- data/lib/less/js/test/less/errors/property-ie5-hack.less +3 -0
- data/lib/less/js/test/less/errors/property-ie5-hack.txt +4 -0
- data/lib/less/js/test/less/errors/recursive-variable.less +1 -0
- data/lib/less/js/test/less/errors/recursive-variable.txt +2 -0
- data/lib/less/js/test/less/functions.less +64 -2
- data/lib/less/js/test/less/ie-filters.less +7 -0
- data/lib/less/js/test/less/import-once.less +4 -0
- data/lib/less/js/test/less/import.less +2 -1
- data/lib/less/js/test/less/import/deeper/import-once-test-a.less +1 -0
- data/lib/less/js/test/less/import/import-and-relative-paths-test.less +6 -0
- data/lib/less/js/test/less/import/import-charset-test.less +1 -0
- data/lib/less/js/test/less/import/import-once-test-c.less +6 -0
- data/lib/less/js/test/less/import/import-test-a.less +1 -0
- data/lib/less/js/test/less/import/import-test-c.less +0 -1
- data/lib/less/js/test/less/import/imports/font.less +8 -0
- data/lib/less/js/test/less/import/imports/logo.less +5 -0
- data/lib/less/js/test/less/import/urls.less +1 -0
- data/lib/less/js/test/less/javascript.less +4 -2
- data/lib/less/js/test/less/media.less +120 -0
- data/lib/less/js/test/less/mixins-args.less +40 -10
- data/lib/less/js/test/less/mixins-guards.less +30 -0
- data/lib/less/js/test/less/mixins-important.less +4 -0
- data/lib/less/js/test/less/mixins-named-args.less +36 -0
- data/lib/less/js/test/less/mixins.less +47 -0
- data/lib/less/js/test/less/scope.less +48 -1
- data/lib/less/js/test/less/selectors.less +81 -0
- data/lib/less/js/test/less/static-urls/urls.less +33 -0
- data/lib/less/js/test/less/strings.less +1 -1
- data/lib/less/js/test/less/urls.less +33 -0
- data/lib/less/js/test/less/variables.less +0 -1
- data/lib/less/js/test/less/whitespace.less +7 -0
- data/lib/less/version.rb +1 -1
- metadata +101 -4
- data/lib/less/js/CHANGELOG +0 -41
- data/lib/less/js/lib/less/cssmin.js +0 -355
@@ -0,0 +1,33 @@
|
|
1
|
+
@import "../imports/urls.less";
|
2
|
+
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
3
|
+
@font-face {
|
4
|
+
src: url("/fonts/garamond-pro.ttf");
|
5
|
+
src: local(Futura-Medium),
|
6
|
+
url(fonts.svg#MyGeometricModern) format("svg");
|
7
|
+
}
|
8
|
+
#shorthands {
|
9
|
+
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
10
|
+
}
|
11
|
+
#misc {
|
12
|
+
background-image: url(images/image.jpg);
|
13
|
+
}
|
14
|
+
#data-uri {
|
15
|
+
background: url(data:image/png;charset=utf-8;base64,
|
16
|
+
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
17
|
+
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
18
|
+
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
19
|
+
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
20
|
+
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
21
|
+
}
|
22
|
+
|
23
|
+
#svg-data-uri {
|
24
|
+
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
25
|
+
}
|
26
|
+
|
27
|
+
.comma-delimited {
|
28
|
+
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
29
|
+
}
|
30
|
+
.values {
|
31
|
+
@a: 'Trebuchet';
|
32
|
+
url: url(@a);
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@import "../imports/urls.less";
|
2
|
+
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
3
|
+
@font-face {
|
4
|
+
src: url("/fonts/garamond-pro.ttf");
|
5
|
+
src: local(Futura-Medium),
|
6
|
+
url(fonts.svg#MyGeometricModern) format("svg");
|
7
|
+
}
|
8
|
+
#shorthands {
|
9
|
+
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
10
|
+
}
|
11
|
+
#misc {
|
12
|
+
background-image: url(images/image.jpg);
|
13
|
+
}
|
14
|
+
#data-uri {
|
15
|
+
background: url(data:image/png;charset=utf-8;base64,
|
16
|
+
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
17
|
+
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
18
|
+
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
19
|
+
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
20
|
+
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
21
|
+
}
|
22
|
+
|
23
|
+
#svg-data-uri {
|
24
|
+
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
25
|
+
}
|
26
|
+
|
27
|
+
.comma-delimited {
|
28
|
+
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
29
|
+
}
|
30
|
+
.values {
|
31
|
+
@a: 'Trebuchet';
|
32
|
+
url: url(@a);
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@import "../imports/urls.less";
|
2
|
+
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
3
|
+
@font-face {
|
4
|
+
src: url("/fonts/garamond-pro.ttf");
|
5
|
+
src: local(Futura-Medium),
|
6
|
+
url(fonts.svg#MyGeometricModern) format("svg");
|
7
|
+
}
|
8
|
+
#shorthands {
|
9
|
+
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
10
|
+
}
|
11
|
+
#misc {
|
12
|
+
background-image: url(images/image.jpg);
|
13
|
+
}
|
14
|
+
#data-uri {
|
15
|
+
background: url(data:image/png;charset=utf-8;base64,
|
16
|
+
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
17
|
+
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
18
|
+
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
19
|
+
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
20
|
+
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
21
|
+
}
|
22
|
+
|
23
|
+
#svg-data-uri {
|
24
|
+
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
25
|
+
}
|
26
|
+
|
27
|
+
.comma-delimited {
|
28
|
+
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
29
|
+
}
|
30
|
+
.values {
|
31
|
+
@a: 'Trebuchet';
|
32
|
+
url: url(@a);
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@import "imports/urls.less";
|
2
|
+
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
3
|
+
@font-face {
|
4
|
+
src: url("/fonts/garamond-pro.ttf");
|
5
|
+
src: local(Futura-Medium),
|
6
|
+
url(fonts.svg#MyGeometricModern) format("svg");
|
7
|
+
}
|
8
|
+
#shorthands {
|
9
|
+
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
10
|
+
}
|
11
|
+
#misc {
|
12
|
+
background-image: url(images/image.jpg);
|
13
|
+
}
|
14
|
+
#data-uri {
|
15
|
+
background: url(data:image/png;charset=utf-8;base64,
|
16
|
+
kiVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD/
|
17
|
+
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
|
18
|
+
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
|
19
|
+
background-image: url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9==);
|
20
|
+
background-image: url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400\),700);
|
21
|
+
}
|
22
|
+
|
23
|
+
#svg-data-uri {
|
24
|
+
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
25
|
+
}
|
26
|
+
|
27
|
+
.comma-delimited {
|
28
|
+
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
29
|
+
}
|
30
|
+
.values {
|
31
|
+
@a: 'Trebuchet';
|
32
|
+
url: url(@a);
|
33
|
+
}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
var webpage = require('webpage');
|
2
|
+
var server = require('webserver').create();
|
3
|
+
var system = require('system');
|
4
|
+
var fs = require('fs');
|
5
|
+
var host, port = 8081;
|
6
|
+
|
7
|
+
var listening = server.listen(port, function (request, response) {
|
8
|
+
//console.log("Requested "+request.url);
|
9
|
+
|
10
|
+
var filename = ("test/" + request.url.slice(1)).replace(/[\\\/]/g, fs.separator);
|
11
|
+
|
12
|
+
if (!fs.exists(filename) || !fs.isFile(filename)) {
|
13
|
+
response.statusCode = 404;
|
14
|
+
response.write("<html><head></head><body><h1>File Not Found</h1><h2>File:"+filename+"</h2></body></html>");
|
15
|
+
response.close();
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
// we set the headers here
|
20
|
+
response.statusCode = 200;
|
21
|
+
response.headers = {"Cache": "no-cache", "Content-Type": "text/html"};
|
22
|
+
|
23
|
+
response.write(fs.read(filename));
|
24
|
+
|
25
|
+
response.close();
|
26
|
+
});
|
27
|
+
if (!listening) {
|
28
|
+
console.log("could not create web server listening on port " + port);
|
29
|
+
phantom.exit();
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Wait until the test condition is true or a timeout occurs. Useful for waiting
|
34
|
+
* on a server response or for a ui change (fadeIn, etc.) to occur.
|
35
|
+
*
|
36
|
+
* @param testFx javascript condition that evaluates to a boolean,
|
37
|
+
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
|
38
|
+
* as a callback function.
|
39
|
+
* @param onReady what to do when testFx condition is fulfilled,
|
40
|
+
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
|
41
|
+
* as a callback function.
|
42
|
+
* @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used.
|
43
|
+
*/
|
44
|
+
function waitFor(testFx, onReady, timeOutMillis) {
|
45
|
+
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 10001, //< Default Max Timeout is 10s
|
46
|
+
start = new Date().getTime(),
|
47
|
+
condition = false,
|
48
|
+
interval = setInterval(function() {
|
49
|
+
if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) {
|
50
|
+
// If not time-out yet and condition not yet fulfilled
|
51
|
+
condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code
|
52
|
+
} else {
|
53
|
+
if(!condition) {
|
54
|
+
// If condition still not fulfilled (timeout but condition is 'false')
|
55
|
+
console.log("'waitFor()' timeout");
|
56
|
+
phantom.exit(1);
|
57
|
+
} else {
|
58
|
+
// Condition fulfilled (timeout and/or condition is 'true')
|
59
|
+
//console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms.");
|
60
|
+
typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled
|
61
|
+
clearInterval(interval); //< Stop this interval
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}, 100); //< repeat check every 100ms
|
65
|
+
};
|
66
|
+
|
67
|
+
function testPage(url) {
|
68
|
+
var page = webpage.create();
|
69
|
+
page.open(url, function (status) {
|
70
|
+
if (status !== "success") {
|
71
|
+
console.log("Unable to access network - " + status);
|
72
|
+
phantom.exit();
|
73
|
+
} else {
|
74
|
+
waitFor(function(){
|
75
|
+
return page.evaluate(function(){
|
76
|
+
return document.body && document.body.querySelector &&
|
77
|
+
document.body.querySelector('.symbolSummary .pending') === null &&
|
78
|
+
document.body.querySelector('.results') !== null;
|
79
|
+
});
|
80
|
+
}, function(){
|
81
|
+
page.onConsoleMessage = function (msg) {
|
82
|
+
console.log(msg);
|
83
|
+
};
|
84
|
+
var exitCode = page.evaluate(function(){
|
85
|
+
console.log('');
|
86
|
+
console.log(document.body.querySelector('.description').innerText);
|
87
|
+
var list = document.body.querySelectorAll('.results > #details > .specDetail.failed');
|
88
|
+
if (list && list.length > 0) {
|
89
|
+
console.log('');
|
90
|
+
console.log(list.length + ' test(s) FAILED:');
|
91
|
+
for (i = 0; i < list.length; ++i) {
|
92
|
+
var el = list[i],
|
93
|
+
desc = el.querySelector('.description'),
|
94
|
+
msg = el.querySelector('.resultMessage.fail');
|
95
|
+
console.log('');
|
96
|
+
console.log(desc.innerText);
|
97
|
+
console.log(msg.innerText);
|
98
|
+
console.log('');
|
99
|
+
}
|
100
|
+
return 1;
|
101
|
+
} else {
|
102
|
+
console.log(document.body.querySelector('.alert > .passingAlert.bar').innerText);
|
103
|
+
return 0;
|
104
|
+
}
|
105
|
+
});
|
106
|
+
testFinished(exitCode);
|
107
|
+
});
|
108
|
+
}
|
109
|
+
});
|
110
|
+
}
|
111
|
+
|
112
|
+
function scanDirectory(path, regex) {
|
113
|
+
var files = [];
|
114
|
+
fs.list(path).forEach(function (file) {
|
115
|
+
if (file.match(regex)) {
|
116
|
+
files.push(file);
|
117
|
+
}
|
118
|
+
});
|
119
|
+
return files;
|
120
|
+
};
|
121
|
+
|
122
|
+
var totalTests = 0,
|
123
|
+
totalFailed = 0,
|
124
|
+
totalDone = 0;
|
125
|
+
|
126
|
+
function testFinished(failed) {
|
127
|
+
if (failed) { totalFailed++; }
|
128
|
+
totalDone++;
|
129
|
+
if (totalDone === totalTests) { phantom.exit(totalFailed > 0 ? 1 : 0); }
|
130
|
+
}
|
131
|
+
|
132
|
+
if (system.args.length != 2 && system.args[1] != "--no-tests") {
|
133
|
+
var files = scanDirectory("test/browser/", /^test-runner-.+\.htm$/);
|
134
|
+
totalTests = files.length;
|
135
|
+
console.log("found " + files.length + " tests");
|
136
|
+
files.forEach(function(file) {
|
137
|
+
testPage("http://localhost:8081/browser/" + file);
|
138
|
+
});
|
139
|
+
}
|
@@ -0,0 +1,15 @@
|
|
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
|
+
});
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<script src="http://localhost:8081/browser/jasmine.js" type="text/javascript"></script>
|
2
|
+
<script src="http://localhost:8081/browser/jasmine-html.js" type="text/javascript"></script>
|
3
|
+
<script src="http://localhost:8081/browser/common.js" type="text/javascript"></script>
|
4
|
+
<script src="http://localhost:8081/browser/runner-{runner-name}.js" type="text/javascript"></script>
|
5
|
+
<script src="http://localhost:8081/browser/less.js" type="text/javascript"></script>
|
6
|
+
<link rel="stylesheet" type="text/css" href="http://localhost:8081/browser/jasmine.css"></link>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
</body>
|
10
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
@charset "UTF-8";
|
@@ -40,6 +40,9 @@
|
|
40
40
|
#grey {
|
41
41
|
color: #c8c8c8;
|
42
42
|
}
|
43
|
+
#333333 {
|
44
|
+
color: #333333;
|
45
|
+
}
|
43
46
|
#808080 {
|
44
47
|
color: #808080;
|
45
48
|
}
|
@@ -56,3 +59,22 @@
|
|
56
59
|
color: blue2;
|
57
60
|
border: 2px solid superred;
|
58
61
|
}
|
62
|
+
.transparent {
|
63
|
+
color: transparent;
|
64
|
+
background-color: rgba(0, 0, 0, 0);
|
65
|
+
}
|
66
|
+
#alpha #fromvar {
|
67
|
+
opacity: 0.7;
|
68
|
+
}
|
69
|
+
#alpha #short {
|
70
|
+
opacity: 1;
|
71
|
+
}
|
72
|
+
#alpha #long {
|
73
|
+
opacity: 1;
|
74
|
+
}
|
75
|
+
#alpha #rgba {
|
76
|
+
opacity: 0.2;
|
77
|
+
}
|
78
|
+
#alpha #hsl {
|
79
|
+
opacity: 1;
|
80
|
+
}
|
@@ -51,6 +51,13 @@
|
|
51
51
|
-webkit-border-radius: 2px /* webkit only */;
|
52
52
|
-moz-border-radius: 8px /* moz only with operation */;
|
53
53
|
}
|
54
|
+
.test {
|
55
|
+
color: 1px //put in @b - causes problems! --->;
|
56
|
+
}
|
54
57
|
#last {
|
55
58
|
color: #0000ff;
|
56
59
|
}
|
60
|
+
/* *//* { *//* *//* *//* */#div {
|
61
|
+
color: #A33;
|
62
|
+
}
|
63
|
+
/* } */
|
@@ -1,14 +1,17 @@
|
|
1
1
|
.comma-delimited {
|
2
|
-
background: url(bg.jpg) no-repeat, url(bg.png) repeat-x top left, url(bg);
|
3
2
|
text-shadow: -1px -1px 1px #ff0000, 6px 5px 5px #ffff00;
|
4
3
|
-moz-box-shadow: 0pt 0pt 2px rgba(255, 255, 255, 0.4) inset, 0pt 4px 6px rgba(255, 255, 255, 0.4) inset;
|
5
4
|
}
|
6
5
|
@font-face {
|
7
6
|
font-family: Headline;
|
8
|
-
|
7
|
+
unicode-range: U+??????, U+0???, U+0-7F, U+A5;
|
9
8
|
}
|
10
9
|
.other {
|
11
10
|
-moz-transform: translate(0, 11em) rotate(-90deg);
|
11
|
+
transform: rotateX(45deg);
|
12
|
+
}
|
13
|
+
.item[data-cra_zy-attr1b-ut3=bold] {
|
14
|
+
font-weight: bold;
|
12
15
|
}
|
13
16
|
p:not([class*="lead"]) {
|
14
17
|
color: black;
|
@@ -56,3 +59,55 @@ p::before {
|
|
56
59
|
border: 3px;
|
57
60
|
}
|
58
61
|
}
|
62
|
+
@keyframes fontbulger1 {
|
63
|
+
to {
|
64
|
+
font-size: 15px;
|
65
|
+
}
|
66
|
+
from,
|
67
|
+
to {
|
68
|
+
font-size: 12px;
|
69
|
+
}
|
70
|
+
0%,
|
71
|
+
100% {
|
72
|
+
font-size: 12px;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
.units {
|
76
|
+
font: 1.2rem/2rem;
|
77
|
+
font: 8vw/9vw;
|
78
|
+
font: 10vh/12vh;
|
79
|
+
font: 12vm/15vm;
|
80
|
+
font: 12vmin/15vmin;
|
81
|
+
font: 1.2ch/1.5ch;
|
82
|
+
}
|
83
|
+
@supports ( box-shadow: 2px 2px 2px black ) or
|
84
|
+
( -moz-box-shadow: 2px 2px 2px black ) {
|
85
|
+
.outline {
|
86
|
+
box-shadow: 2px 2px 2px black;
|
87
|
+
-moz-box-shadow: 2px 2px 2px black;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
@-x-document url-prefix(""github.com"") {
|
91
|
+
h1 {
|
92
|
+
color: red;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
@viewport {
|
96
|
+
font-size: 10px;
|
97
|
+
}
|
98
|
+
@namespace foo url(http://www.example.com);
|
99
|
+
foo | h1 {
|
100
|
+
color: blue;
|
101
|
+
}
|
102
|
+
foo | * {
|
103
|
+
color: yellow;
|
104
|
+
}
|
105
|
+
| h1 {
|
106
|
+
color: red;
|
107
|
+
}
|
108
|
+
* | h1 {
|
109
|
+
color: green;
|
110
|
+
}
|
111
|
+
h1 {
|
112
|
+
color: green;
|
113
|
+
}
|