Changing css colour from svelte store #12559
Unanswered
ItsTerm1n4l
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Where is the new value coming from? Tailwind only generates CSS for classes it can detect in the code, otherwise you need to specify possible classes in the If the class is e.g. constructed from multiple string parts, try avoiding that so the full name is visible to Tailwind. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I have a svelte store that is set to a tailwind css class (
fill-sky-950
) and I have this store subscribed to in my css class and the css updates to this new value but the site doesn'tsee it stays black even though in the site inspector it has the new value
More info:
My backend contains colours and the store is set to one of them and so is written to after the site has loaded, if i set the store's value beforehand that colour does work on the site.
so this sets the colour as expected
whereas if I update the store with a new colour later the css updates but the colour on the site is just black (see my screenshots).
I hope this makes sense
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions