-
I'm attempting to set a background image using an arbitrary value that is an svg. I'm not entirely sure where I've gone wrong, but I can't seem to get it to work. I've tried setting it inline and setting it as part of the theme, and neither work. No class generates at all. Here's what I'm using: #12322 Seems like a very similar problem, if not the same. I also found this plugin, which looks like it only works because it's writing the classes itself. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You'd need to URL-encode the SVG:
|
Beta Was this translation helpful? Give feedback.
-
Is this only possible by extending?? Im also trying to do this inline in my class |
Beta Was this translation helpful? Give feedback.
Ah thank you for pointing me in the right direction. It actually does seem to work without url encoding as well, turns out I just needed to recompile as changes to my tailwind config weren't being picked up dynamically.
Updated Tailwind Play
It does only work by extending the tailwind theme though, trying to use an inline arbitrary value does not (probably something to do with trying to create an invalid class name).