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
I am trying to pass some dynamic styles to a DOM element, in this case a <li> and I am getting parser errors. I've created a repo to illustrate the problem.
In this repo, in the the index.templ, within the for loop, when you remove the style attribute it works just fine so that tells me I am writing the dynamic class correctly but the same isn't true for the style attribute. Is this intentionally not supported? The CSS section of the docs doesn't mention this case explicitly.
When I run templ generate with the style attribute included I get this error:
Processing path: /home/jtappert/Workspace/templ-css
(!) templ version check failed: generator v0.2.543 is older than templ version v0.2.707 found in go.mod file, consider upgrading templ CLI
Generating production code: /home/jtappert/Workspace/templ-css
(✗) Error processing path: /home/jtappert/Workspace/templ-css/index.templ parsing error: for: expected nodes, but none were found: line 12, col 4
(✗) Generated code for 1 templates with 1 errors in 1.010371ms
I am happy to provide anymore information or answer any questions. Just let me know!
The text was updated successfully, but these errors were encountered:
I am trying to pass some dynamic styles to a DOM element, in this case a
<li>
and I am getting parser errors. I've created a repo to illustrate the problem.In this repo, in the the
index.templ
, within the for loop, when you remove thestyle
attribute it works just fine so that tells me I am writing the dynamic class correctly but the same isn't true for the style attribute. Is this intentionally not supported? The CSS section of the docs doesn't mention this case explicitly.When I run
templ generate
with the style attribute included I get this error:I am happy to provide anymore information or answer any questions. Just let me know!
The text was updated successfully, but these errors were encountered: