media-query can now be a variable

This commit is contained in:
Marcel Jackwerth
2012-02-20 17:28:24 +01:00
parent d17a4614b6
commit 9f9eeec297
3 changed files with 21 additions and 6 deletions

View File

@@ -1074,11 +1074,18 @@ less.Parser = function Parser(env) {
},
mediaFeatures: function () {
var f, features = [];
while (f = $(this.mediaFeature)) {
features.push(f);
if (! $(',')) { break }
}
var features = [];
do {
if (e = $(this.mediaFeature)) {
features.push(e);
if (! $(',')) { break }
} else if (e = $(this.entities.variable)) {
features.push(e);
if (! $(',')) { break }
}
} while (e);
return features.length > 0 ? features : null;
},