Merge remote-tracking branch 'origin/master' into 2_0_0

Conflicts:
	lib/less/index.js
	lib/less/parser/parser.js
	lib/less/tree/rule.js
	test/less/property-name-interp.less
This commit is contained in:
Luke Page
2014-09-03 07:36:20 +01:00
8 changed files with 46 additions and 7 deletions

View File

@@ -58,6 +58,12 @@
.sr-only-focusable {
clip: auto;
}
@-webkit-keyframes hover {
/* and Chrome */
0% {
color: red;
}
}
#last {
color: blue;
}

View File

@@ -1,5 +1,6 @@
pi-test {
border: 0;
@not-variable: @not-variable;
ufo-width: 50%;
*-z-border: 1px dashed blue;
-www-border-top: 2px;

View File

@@ -62,7 +62,7 @@
*/
.selector /* .with */, .lots, /* of */ .comments {
color: grey, /* blue */ orange;
color/* survive */ /* me too */: grey, /* blue */ orange;
-webkit-border-radius: 2px /* webkit only */;
-moz-border-radius: (2px * 4) /* moz only with operation */;
}
@@ -84,6 +84,12 @@
clip: auto;
}
@-webkit-keyframes /* Safari */ hover /* and Chrome */ {
0% {
color: red;
}
}
#last { color: blue }
//

View File

@@ -7,7 +7,10 @@ pi-test {
@d-d4: radius;
@-: -;
@var: ~'@not-variable';
@{a}: 0;
@{var}: @var;
@{prefix}width: 50%;
*-z-@{a} :1px dashed blue;
-www-@{a}-@{bb}: 2px;

17
test/modify-vars.js Normal file
View File

@@ -0,0 +1,17 @@
var less = require('../lib/less'),
fs = require('fs')
var input = fs.readFileSync("./test/less/modifyVars/extended.less", 'utf8')
var expectedCss = fs.readFileSync('./test/css/modifyVars/extended.css', 'utf8')
var options = {
modifyVars: JSON.parse(fs.readFileSync("./test/less/modifyVars/extended.json", 'utf8'))
}
less.render(input, options, function (err, css) {
if (err) console.log(err);
if (css === expectedCss) {
console.log("PASS")
} else {
console.log("FAIL")
}
})