-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
passing string into is:inline style tag doesn't render said string as child text #11167
Comments
I think it's more that the compiler always expect CSS syntax in the |
|
(context is that we were talking about removing |
Sorry misclosed whle switching tab 😅 Typing my proper comment next |
If we have the compiler allowing I'm open to re-thinking how interpolating vars work though. I think the ideal way is something like this? <style is:inline>
h1 {
color: ${color};
}
</style> So you can use normal CSS syntax, and easily interpolate variables. I wrote an RFC for Svelte before (which didn't go through), but the conclusion was the same |
@bluwy I do like that idea as a feature. I don't think this would be ambiguous though. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Renders the code instead.
What's the expected result?
I was sort of expecting it to put the string child in there. Maybe there's a security consideration and
set:html
is better?Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ncpwkk?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: