Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect interpolation of CSS declarations into inline styles #3309

Closed
loilo opened this issue Jul 29, 2019 · 3 comments
Closed

Incorrect interpolation of CSS declarations into inline styles #3309

loilo opened this issue Jul 29, 2019 · 3 comments

Comments

@loilo
Copy link

loilo commented Jul 29, 2019

Describe the bug
Inline styles with interpolations inside can behave very strangely. This only seems to be the case when a whole CSS property name is interpolated.

This is very hard to describe with words and I probably haven't even grasped the exact cause for this error, so please take a look at the comprehensive REPL linked below.

To Reproduce
Here's the REPL. I've tried to boil it down as much as I could and cover any edge cases I could imagine.

Severity
There are workarounds to avoid this issue, so now that I know it, this is just a minor annoyance for me. However it is completely unexpected and incorrect behavior so it will hit users harder who are not as experienced with debugging issues like this.

@Conduitry
Copy link
Member

This looks like a duplicate of #1830. I'm not entirely sure which of these we're going to consider bugs, but it's good to have a list of some more weird cases. I'll add this to the other issue.

@loilo
Copy link
Author

loilo commented Jul 29, 2019

Aw, saw that issue during preparation but did not realize it's actually the same cause. Sorry for not spotting the duplicate.

@Rich-Harris
Copy link
Member

Fixed in 3.9.0! https://svelte.dev/repl/5d68597ce6854beba658aed433632f22?version=3.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants