File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
lib/style-compiler/plugins Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -32,17 +32,15 @@ module.exports = postcss.plugin('add-id', function (opts) {
3232 } )
3333
3434 // If keyframes are found in this <style>, find and rewrite animation names
35- // in declarations
36- //
37- // TODO: the keyframes tracking needs to be across multiple <style> tags
38- // that belongs to the same component...
35+ // in declarations.
36+ // Caveat: this only works for keyframes and animation rules in the same
37+ // <style> element.
3938 if ( Object . keys ( keyframes ) . length ) {
4039 root . walkDecls ( decl => {
4140 // individual animation-name declaration
4241 if ( / - ? a n i m a t i o n - n a m e $ / . test ( decl . prop ) ) {
4342 decl . value = decl . value . split ( ',' )
44- . map ( v => keyframes [ v . trim ( ) ] )
45- . filter ( v => v )
43+ . map ( v => keyframes [ v . trim ( ) ] || v . trim ( ) )
4644 . join ( ',' )
4745 }
4846 // shorthand
You can’t perform that action at this time.
0 commit comments