mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
parse alpha in call() instead
This commit is contained in:
@@ -183,6 +183,8 @@ less.parser = {
|
||||
|
||||
if (! (name = $(/([a-zA-Z0-9_-]+)\(/g))) return;
|
||||
|
||||
if (name[1] === 'alpha') { return $(this.alpha) }
|
||||
|
||||
args = $(this.entities.arguments);
|
||||
|
||||
if (! $(')')) return;
|
||||
@@ -298,7 +300,7 @@ less.parser = {
|
||||
alpha: function alpha() {
|
||||
var value;
|
||||
|
||||
if (! $(/alpha\(opacity=/g)) return;
|
||||
if (! $(/opacity=/g)) return;
|
||||
if (value = $(/[0-9]+/g) || $(this.entities.variable)) {
|
||||
if (! $(')')) throw new(Error)("missing closing ) for alpha()");
|
||||
return new(node.Alpha)(value);
|
||||
@@ -413,8 +415,6 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user