Binding a class to SVG Tag #7510
Closed
stephenmeehanuk
started this conversation in
General
Replies: 1 comment 5 replies
-
Try this: |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone come across this?
I'm using AlpineJS to bind a class to a SVG, doing so directly to a SVG tag works as expected. Classes toggle, and the existing classes
h-5 w-5 ease-in-out duration-300
are preserved.However, class binding doesn't appear to work with the antlers
SVG Tag
?Outputs this
These classes are removed
h-5 w-5 ease-in-out duration-300
and it's replaced withlg:fill-orange-400
When using the
SVG Tag
I'd like it to preserve the classes. Also, the classes on the SVG Tag don't toggle whenmastAlt
is true/false?Beta Was this translation helpful? Give feedback.
All reactions