mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
optional ; after VariableCall at the end of {} block
i.e. allow `div {@var()}` to become consistent with the rest of CSS/Less syntax
This commit is contained in:
@@ -687,14 +687,16 @@ var Parser = function Parser(context, imports, fileInfo) {
|
||||
},
|
||||
|
||||
//
|
||||
// The variable part of a variable definition. Used in the `rule` parser
|
||||
// Call a variable value
|
||||
//
|
||||
// @fink();
|
||||
// @fink()
|
||||
//
|
||||
variableCall: function () {
|
||||
var name;
|
||||
|
||||
if (parserInput.currentChar() === '@' && (name = parserInput.$re(/^(@[\w-]+)\(\s*\)\s*;/))) {
|
||||
if (parserInput.currentChar() === '@'
|
||||
&& (name = parserInput.$re(/^(@[\w-]+)\(\s*\)/))
|
||||
&& parsers.end()) {
|
||||
return new tree.VariableCall(name[1]);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
.wrap-mixin(@ruleset);
|
||||
|
||||
.desktop-and-old-ie(@rules) {
|
||||
@media screen and (min-width: 1200) { @rules(); }
|
||||
html.lt-ie9 & { @rules(); }
|
||||
@media screen and (min-width: 1200) { @rules() }
|
||||
html.lt-ie9 & { @rules() }
|
||||
}
|
||||
|
||||
header {
|
||||
|
||||
Reference in New Issue
Block a user