Genie Discord forum

Author AvatarJuliane Müller-Sielaff
2/14/2023, 8:34:28 AM

Hello, is it possible to use a julia variable defined for example as @out active = "blue" inside css? In my html, I have to use some svg with coloring dependend on data.

Example:

<circle cx="50" cy="50" r="20" stroke="#333" stroke-width="4" fill= "<%:active%>">

Author AvatarPere
2/27/2023, 11:24:11 AM

@Juliane Müller-Sielaff for embedding inline code within HTML tags it is best to use the $() syntax.

<circle cx="50" cy="50" r="20" stroke="#333" stroke-width="4" fill= "$(active)"></circle>
Author Avatarhhaensel
3/8/2023, 12:02:09 AM

... and then probably span(v__html = """<circle cx="50" cy="50" r="20" stroke="#333" stroke-width="4" fill="$(active)"></circle>""")