-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class directive breaks with token "/" for TailwindCSS width classes #4072
Comments
This bug is not reproducible now and I'm closing the issue. |
I'm also having this bug. |
I'm experiencing this too, in 3.44.2, what version are you on? Also finding that Svelte doesn't recognise EDIT: Also happening if I remove the shorthand syntax: EDIT: Also happening if the class doesn't clash at all: I should add that I'm using EDIT: Upgrading to |
Reopening since this still seems to be an issue - can someone provide a REPL showing the issue? |
Here is example repositoryI created for you with the issue in index.svelte git repo |
@git-no thanks, I totally forgot to do this. |
I have also this issue, Class directive breaks with token "/" for TailwindCSS |
any update on this? |
I remove my demo repository because it was not used for 1 1/2 years. To remind, this does not work: |
Confirmed still broken in Svelte 5. Related: #7170 |
See #7170 (comment) for a proposal |
Describe the bug
When using specific classes like "w-1/2", which is standard tailwind class, the svelte compiler throws an error "Expected >svelte(unexpected-token)"
I'm pretty sure it is because the compiler assumes token ">" after the token in question "/".
To Reproduce
Write any code with a class directive
class:sm:w-1/2={!contact}
in a Svelte+Tailwind project.Expected behavior
Compiler should not assume that the closing ">" token to succeed token "/" in a string after the class directive.
The text was updated successfully, but these errors were encountered: