mirror of https://github.com/sveltejs/svelte
Merge pull request #1505 from kaisermann/transform-prefixed-keyframes
Make the compiler also transform prefixed @keyframespull/1516/head
commit
024530ed53
@ -0,0 +1,7 @@
|
||||
import { Node } from '../interfaces';
|
||||
|
||||
export default function isKeyframesNode(node: Node): boolean {
|
||||
return ['', '-webkit-', '-moz-', '-o-'].some(
|
||||
prefix => node.name === `${prefix}keyframes`
|
||||
);
|
||||
}
|
@ -0,0 +1 @@
|
||||
@keyframes svelte-xyz-why{0%{color:red}100%{color:blue}}@-webkit-keyframes svelte-xyz-why{0%{color:red}100%{color:blue}}@-moz-keyframes svelte-xyz-why{0%{color:red}100%{color:blue}}@-o-keyframes svelte-xyz-why{0%{color:red}100%{color:blue}}.animated.svelte-xyz{animation:svelte-xyz-why 2s}.also-animated.svelte-xyz{animation:not-defined-here 2s}
|
@ -0,0 +1,32 @@
|
||||
<div class='animated'>animated</div>
|
||||
<div class='also-animated'>also animated</div>
|
||||
|
||||
<style>
|
||||
@keyframes why {
|
||||
0% { color: red; }
|
||||
100% { color: blue; }
|
||||
}
|
||||
|
||||
@-webkit-keyframes why {
|
||||
0% { color: red; }
|
||||
100% { color: blue; }
|
||||
}
|
||||
|
||||
@-moz-keyframes why {
|
||||
0% { color: red; }
|
||||
100% { color: blue; }
|
||||
}
|
||||
|
||||
@-o-keyframes why {
|
||||
0% { color: red; }
|
||||
100% { color: blue; }
|
||||
}
|
||||
|
||||
.animated {
|
||||
animation: why 2s;
|
||||
}
|
||||
|
||||
.also-animated {
|
||||
animation: not-defined-here 2s;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue