Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Multiple variants not working #72

Closed
zbeyens opened this issue Mar 16, 2021 · 2 comments
Closed

Multiple variants not working #72

zbeyens opened this issue Mar 16, 2021 · 2 comments

Comments

@zbeyens
Copy link

zbeyens commented Mar 16, 2021

I ran the command:
TAILWIND_MODE=watch postcss src/assets/tailwind.css -o src/assets/tailwind.output.css -w with a component class hover:underline, which outputs:

.hover\:underline:hover {
  text-decoration: underline;
}

Then I modify the component class to hover:underline focus:underline which outputs:

.focus\:hover\:underline:focus:hover {
  text-decoration: underline;
}

Then I revert back the component class to hover:underline but it still outputs

.focus\:hover\:underline:focus:hover {
  text-decoration: underline;
}

Requirements

"@tailwindcss/jit": "^0.1.1",
"tailwindcss": "^2.0.3",
"postcss": "^8.2.8",
"postcss-cli": "^8.3.1",
"autoprefixer": "^10.2.5",
@adamwathan
Copy link
Member

Hey! I think what you are seeing is just that when you edit HTML, we only add new classes, we don't delete old classes even if they aren't used anymore. This is a performance optimization that makes a big difference in incremental builds. Are you 100% sure the hover:underline class was removed? If so can you provide a GitHub repo that reproduces?

@zbeyens
Copy link
Author

zbeyens commented Mar 17, 2021

Yes it was removing it. The issue was that I've installed tailwindcss-jit at the root of the monorepo (yarn workspaces) while the other ones were in the app package. Moving it to the app dependencies fixed it.

Thanks for your time!

@zbeyens zbeyens closed this as completed Mar 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants