File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -243,8 +243,12 @@ function localizeAnimationShorthandDeclValues(decl, context) {
243
243
} ;
244
244
245
245
const didParseAnimationName = false ;
246
- const parsedAnimationKeywords = { } ;
246
+ let parsedAnimationKeywords = { } ;
247
247
const valueNodes = valueParser ( decl . value ) . walk ( ( node ) => {
248
+ /* If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh. */
249
+ if ( node . type === 'div' ) {
250
+ parsedAnimationKeywords = { } ;
251
+ }
248
252
const value =
249
253
node . type === 'word' ? node . value . toLowerCase ( ) : null ;
250
254
Original file line number Diff line number Diff line change @@ -191,6 +191,13 @@ const tests = [
191
191
expected :
192
192
':local(.foo) { animation: 1s normal ease-out infinite :local(foo); }'
193
193
} ,
194
+ {
195
+ should :
196
+ 'not treat animation curve as identifier of animation name even if it separated by comma' ,
197
+ input : '.foo { animation: slide-right 300ms forwards ease-out, fade-in 300ms forwards ease-out; }' ,
198
+ expected :
199
+ ':local(.foo) { animation: :local(slide-right) 300ms forwards ease-out, :local(fade-in) 300ms forwards ease-out; }'
200
+ } ,
194
201
{
195
202
should : 'handle animations with custom timing functions' ,
196
203
input :
You can’t perform that action at this time.
0 commit comments