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) {
243243 } ;
244244
245245 const didParseAnimationName = false ;
246- const parsedAnimationKeywords = { } ;
246+ let parsedAnimationKeywords = { } ;
247247 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+ }
248252 const value =
249253 node . type === 'word' ? node . value . toLowerCase ( ) : null ;
250254
Original file line number Diff line number Diff line change @@ -191,6 +191,13 @@ const tests = [
191191 expected :
192192 ':local(.foo) { animation: 1s normal ease-out infinite :local(foo); }'
193193 } ,
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+ } ,
194201 {
195202 should : 'handle animations with custom timing functions' ,
196203 input :
You can’t perform that action at this time.
0 commit comments