We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcb95dd commit d3b96ebCopy full SHA for d3b96eb
lib/style-compiler/plugins/scope-id.js
@@ -72,10 +72,11 @@ module.exports = postcss.plugin('add-id', function (opts) {
72
if (/-?animation$/.test(decl.prop)) {
73
decl.value = decl.value.split(',')
74
.map(v => {
75
- var vals = v.split(/\s+/)
76
- var name = vals[0]
77
- if (keyframes[name]) {
78
- return [keyframes[name]].concat(vals.slice(1)).join(' ')
+ var vals = v.trim().split(/\s+/)
+ var i = vals.findIndex(val => keyframes[val])
+ if (i !== -1) {
+ vals.splice(i, 1, keyframes[vals[i]])
79
+ return vals.join(' ')
80
} else {
81
return v
82
}
0 commit comments