fix global keyframes with no elements

pull/3229/head
pynnl 6 years ago
parent 2b79a2269d
commit c33e4be6dc

@ -217,6 +217,11 @@ class Atrule {
if (type === 'Identifier') {
if (name.startsWith('-global-')) {
code.remove(start, start + 8);
this.children.forEach((rule: Rule) => {
rule.selectors.forEach(selector => {
selector.used = true;
});
});
} else {
code.overwrite(start, end, keyframes.get(name));
}

@ -0,0 +1 @@
@keyframes why{0%{color:red}100%{color:blue}}

@ -0,0 +1,6 @@
<style>
@keyframes -global-why {
0% { color: red; }
100% { color: blue; }
}
</style>
Loading…
Cancel
Save