You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is mitigated by prepending "-global-" to the keyframes definition, as this stops the transforming of "spinner" inside the animation CSS property.
Ultimately, the issue lies with the keyframes name not being transformed inside of the CSS animation property. Other styles, such as a fill on the child path work fine. This does have fixes, as shown, but the bug is because of the inconsistent behaviour between, what at least has been documented as, identical-results code.
The commented out :global is correct. The bug is that during transformation we're not traversing into the children of :global at all, missing the transformation for the keyframes
Describe the bug
Some psuedo code to start us off:
+page.svelte syntax
Load.svelte
+page.svelte CSS
This +page.svelte CSS does NOT work. The compiled code looks like this:
Two things to note:
Now if we use :global(svg) {} instead of :global {svg {}}
We see that the code compiles properly:
The issue is mitigated by prepending "-global-" to the keyframes definition, as this stops the transforming of "spinner" inside the animation CSS property.
Ultimately, the issue lies with the keyframes name not being transformed inside of the CSS animation property. Other styles, such as a fill on the child path work fine. This does have fixes, as shown, but the bug is because of the inconsistent behaviour between, what at least has been documented as, identical-results code.
Reproduction
:global {svg {}}
: https://svelte.dev/playground/b2fdfc1acdd745019e9d9adc8cc25461?version=5.6.2 - does NOT work:global {svg {}} with -global-
: https://svelte.dev/playground/d1687dba46194588b3c28bb2c463761e?version=5.6.2 - does work:global(svg) {}
: https://svelte.dev/playground/d556d2848000432d9126ad9feeaa204b?version=5.6.2 - does workIn all of these you can see the red fill applies to each perfectly, showing the issue is specific to name transforming.
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: