Skip to content

Commit 9098bec

Browse files
committed
don't localize animation-delay etc.
fixed webpack-contrib/css-loader#107
1 parent 343c4d0 commit 9098bec

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function localizeDeclValue(valueNode, context) {
175175

176176
function localizeDecl(decl, context) {
177177
var valuesNode = Tokenizer.parseValues(decl.value);
178-
var localizeName = /animation(-name)?/.test(decl.prop);
178+
var localizeName = /animation(-name)?$/.test(decl.prop);
179179
var newValuesNode = Object.create(valuesNode);
180180
newValuesNode.nodes = valuesNode.nodes.map(function(valueNode) {
181181
var subContext = {

test.js

+5
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ var tests = [
139139
input: '.foo { animation-name: bar; }',
140140
expected: ':local(.foo) { animation-name: :local(bar); }'
141141
},
142+
{
143+
should: 'not localize a single animation-delay',
144+
input: '.foo { animation-delay: 1s; }',
145+
expected: ':local(.foo) { animation-delay: 1s; }'
146+
},
142147
{
143148
should: 'localize multiple animation-names',
144149
input: '.foo { animation-name: bar, foobar; }',

0 commit comments

Comments
 (0)