mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
add support for @keyframes blocks
This commit is contained in:
@@ -787,7 +787,7 @@ less.Parser = function Parser(env) {
|
||||
var e, t, c;
|
||||
|
||||
c = $(this.combinator);
|
||||
e = $(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/) || $('*') || $(this.attribute) || $(/^\([^)@]+\)/);
|
||||
e = $(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/) || $('*') || $(this.attribute) || $(/^\([^)@]+\)/) || $(/^(?:\d*\.)?\d+%/);
|
||||
|
||||
if (e) { return new(tree.Element)(c, e) }
|
||||
|
||||
@@ -889,7 +889,7 @@ less.Parser = function Parser(env) {
|
||||
var selectors = [], s, rules, match;
|
||||
save();
|
||||
|
||||
if (match = /^([.#: \w-]+)[\s\n]*\{/.exec(chunks[j])) {
|
||||
if (match = /^([.#:% \w-]+)[\s\n]*\{/.exec(chunks[j])) {
|
||||
i += match[0].length - 1;
|
||||
selectors = [new(tree.Selector)([new(tree.Element)(null, match[1])])];
|
||||
} else {
|
||||
@@ -966,7 +966,7 @@ less.Parser = function Parser(env) {
|
||||
|
||||
if (value = $(this['import'])) {
|
||||
return value;
|
||||
} else if (name = $(/^@media|@page|@-[-a-z]+/)) {
|
||||
} else if (name = $(/^@media|@page/) || $(/^@(?:-webkit-)?keyframes/)) {
|
||||
types = ($(/^[^{]+/) || '').trim();
|
||||
if (rules = $(this.block)) {
|
||||
return new(tree.Directive)(name + " " + types, rules);
|
||||
|
||||
Reference in New Issue
Block a user