Merge pull request #3229 from pynnl/gh-3228

Fix global keyframes with no elements
pull/3219/head
Rich Harris 5 years ago committed by GitHub
commit be30a4c66c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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