parse IE's alpha()
This commit is contained in:
parent
2353885d6a
commit
9970cb0124
@ -9,7 +9,7 @@ process.mixin(less, require('less/parser'));
|
||||
['color', 'directive', 'operation', 'dimension',
|
||||
'keyword', 'variable', 'ruleset', 'element',
|
||||
'selector', 'quoted', 'expression', 'rule',
|
||||
'call', 'url'
|
||||
'call', 'url', 'alpha'
|
||||
].forEach(function (n) {
|
||||
process.mixin(less.parser, require(path.join('less', 'node', n)));
|
||||
});
|
||||
|
@ -295,6 +295,15 @@ less.parser = {
|
||||
}
|
||||
}
|
||||
},
|
||||
alpha: function alpha() {
|
||||
var value;
|
||||
|
||||
if (! $(/alpha\(opacity=/g)) return;
|
||||
if (value = $(/[0-9]+/g) || $(this.entities.variable)) {
|
||||
if (! $(')')) throw new(Error)("missing closing ) for alpha()");
|
||||
return new(node.Alpha)(value);
|
||||
}
|
||||
},
|
||||
combinator: function combinator() {
|
||||
var match;
|
||||
if (match = $(/[+>~]/g) || $('&') || $(/::/g)) {
|
||||
@ -404,6 +413,8 @@ less.parser = {
|
||||
expressions.push(e);
|
||||
if (! $(',')) { break }
|
||||
}
|
||||
|
||||
if (expressions.length === 0 && (e = $(this.alpha))) { expressions.push(e) }
|
||||
important = $(/!\s*important/g);
|
||||
|
||||
if (expressions.length > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user