Skip to content

How can i change variant for cards #2458

Discussion options

You must be logged in to vote

@ZAAFHachemrachid so two things here.

First, so the important thing to note about Tailwind is how it choses to bundle classes into your build's stylesheet. In a nutshell, the Tailwind compiler scans all paths specified in the Tailwind Config > content setting. This typically includes all your local app files, and in the case of Skeleton, the node_modules package path to Skeleton. To ensure Tailwind bundles the styles needed for components too.

When the compiler scans these your local app files, it's looking for a verbatim instance of that class in the files. This is why you cannot dynamically construct classes:
https://tailwindcss.com/docs/content-configuration#dynamic-class-names

So I wo…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ZAAFHachemrachid
Comment options

@ZAAFHachemrachid
Comment options

@endigo9740
Comment options

Answer selected by ZAAFHachemrachid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants