-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Single-brace tags make inline non-root styles impractical #1339
Comments
I would argue that non-top-level What are the uses for them? Maybe those uses can be met some other way. |
I'm using them not infrequently on pages where I'm using Svelte SSR as a static site generation tool. I could use external css/js files for all of those but that doesn't always make the most sense. |
Are you using interpolation? What if the contents of |
I'm not personally using interpolation, but it has its proponent(s). This is something that used to work, then was unknowingly broken (because it was never actually an intended feature), and then re-added when it was requested. I'd be fine with passing through the style tags as-is, but I don't think everyone would be. |
Oops, I wasn't really paying attention to that issue. I would argue that there are much better ways to solve that problem than placing tags inside a nested If the styles are known at build time it could be done with |
Well I'll defer to you on the User Alienation Decisions, but removing interpolation does indeed to seem the most straightforward path. I'll work on a PR, it should be a pretty simple change. |
I think a good framework should protect you from footguns, even the really tempting ones. @cristinecula since you opened #1147, a heads-up: we're planning to remove interpolation inside |
@Rich-Harris thanks for the heads up! |
The v2 change of
{{expression}}
to{expression}
wreaks havoc with inline non-root style tags, which are getting parsed for them so we can interpolate the styles at runtime. This is quite inconvenient, as things that are enclosed in braces happen (surprise!) all the time in CSS. I don't know what's a good way to reconcile this.The text was updated successfully, but these errors were encountered: