Skip to content
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

[Bug]: Optional svelte class not working with line breaks in HTML when using JIT #4181

Closed
tobx opened this issue Apr 25, 2021 · 1 comment · Fixed by #4187
Closed

[Bug]: Optional svelte class not working with line breaks in HTML when using JIT #4181

tobx opened this issue Apr 25, 2021 · 1 comment · Fixed by #4187

Comments

@tobx
Copy link

tobx commented Apr 25, 2021

What version of Tailwind CSS are you using?

2.1.2

What build tool (or framework if it abstracts the build tool) are you using?

Svelte 3.35.0

What version of Node.js are you using?

15.14.0

What browser are you using?

Firefox, Safari, Chrome

What operating system are you using?

macOS

Reproduction repository

https://github.com/tobx/tailwind-svelte-reproduction

Describe your issue

An optional svelte class is not working with line breaks in HTML only when using JIT.

Reproduce:

  1. Install and run:
    npm install
    npm run dev
  2. Open http://localhost:5000
  3. The text is black.
  4. Change lines 6 - 8 in src/App.sveltefrom:
    <div
      class:text-green-500={hover}
    >
    to
    <div class:text-green-500={hover} >
  5. The text turns green.

This only happens in jit mode.

@tobx tobx changed the title [Bug]: Special svelte class causes bug only when using JIT [Bug]: Optional svelte class not working with line breaks in HTML when using JIT Apr 25, 2021
@tobx
Copy link
Author

tobx commented Apr 25, 2021

I updated the issue, because I could minimize it even further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant