Replies: 1 comment 1 reply
-
Here's Tailwind's documentation on this. In short, constructed classes like this are not supported: The best way to think about this is that Tailwind reads the values verbatim from your code. This means it sees So the better option is to toggle between a set of canned options like so: let sizeSmall = false <AppRail width={sizeSmall ? 'w-[50px]` : 'w-[100px]`}> You could abstract this further if you wanted to have multiple options, but again, remember when Tailwind inspects the file, the classes it finds must be legit classes. |
Beta Was this translation helpful? Give feedback.
-
Hello, I have an AppRail that, on a button click, hides the AppRailTile text and tries to set the width to a smaller size.
Setting the width to a svelte reactive variable does not seam to work, like
<AppRail width="w-{$railWidth}"
I see the value changing in the developer tools, but the AppRail is not changing size. New to skeleton and svelte, so any suggestions would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions