Skip to content

Add keyframes support for scoped style ? #245

@jihchi

Description

@jihchi

Consider following example:
https://svelte.technology/repl/?version=1.6.3&gist=5390c2517520e606bb02ce8168f3b8b0

Currently, Svelte will output results as example:

.foo[svelte-3750005346], [svelte-3750005346] .foo {
    color: red;
    font-size: 2em;
    font-family: 'Comic Sans MS';
    animation: spin-360 infinite 20s linear;
}

@keyframes spin-360 {
    from[svelte-3750005346], [svelte-3750005346] from { transform: rotate(0deg); }
    to[svelte-3750005346], [svelte-3750005346] to { transform: rotate(360deg); }
}

Which animation won't works.

Expect that css should be:

@@ -6,6 +6,6 @@
 }
 
 @keyframes spin-360 {
-    from[svelte-3750005346], [svelte-3750005346] from { transform: rotate(0deg); }
-    to[svelte-3750005346], [svelte-3750005346] to { transform: rotate(360deg); }
+    from { transform: rotate(0deg); }
+    to { transform: rotate(360deg); }
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions