diff --git a/index.js b/index.js index c9ec822..0e077d2 100644 --- a/index.js +++ b/index.js @@ -175,7 +175,7 @@ function localizeDeclValue(valueNode, context) { function localizeDecl(decl, context) { var valuesNode = Tokenizer.parseValues(decl.value); - var localizeName = /animation(-name)?/.test(decl.prop); + var localizeName = /animation(-name)?$/.test(decl.prop); var newValuesNode = Object.create(valuesNode); newValuesNode.nodes = valuesNode.nodes.map(function(valueNode) { var subContext = { diff --git a/test.js b/test.js index ddecc33..f27f623 100644 --- a/test.js +++ b/test.js @@ -139,6 +139,11 @@ var tests = [ input: '.foo { animation-name: bar; }', expected: ':local(.foo) { animation-name: :local(bar); }' }, + { + should: 'not localize a single animation-delay', + input: '.foo { animation-delay: 1s; }', + expected: ':local(.foo) { animation-delay: 1s; }' + }, { should: 'localize multiple animation-names', input: '.foo { animation-name: bar, foobar; }',