-
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
Duplicated CSS rules in @media output #4896
Comments
Updating this issue with some additional observations from my local development. When running JIT watch mode (via I end up with a file that looks like this:
Triggering a re-processing of the primary CSS file that contains the calls to If I'm missing something here and inadvertently causing the issue, I'd welcome any insight! |
I'm a novice, but confirm your tailwind.config.js file's "purge" settings are complete and correct |
Just thought I'd note that I'm experiencing the same thing with duplicate CSS, and I happen to have all these things in common with the OP, though I'm not sure which of these are relevant just yet:
However, I'm using Laravel Mix + BrowserSync to watch files and recompile as needed. Duplicate rules seem to accumulate during a single BrowserSync session. If I restart my watch task, the duplicate rules get cleaned up. |
if you have already node js installed or after installing open node command prompt window by typing node( on windows machine) in start. |
What version of Tailwind CSS are you using?
2.2.4
What build tool (or framework if it abstracts the build tool) are you using?
Gulp and tailwindcss-cli
What version of Node.js are you using?
v14.17.2
What browser are you using?
N/A
What operating system are you using?
Windows 10
Reproduction repository
https://play.tailwindcss.com/6re84tZQjw?file=css
Describe your issue
Noticed this recently and just curious if this is the intended/expected behavior. In JIT mode, when using
@apply
, responsive variants (e.g.md:
) are output as separate, duplicate CSS rules rather than combined into one (as is the case with non-responsive rules). Note: This is the case whether one uses multiple@apply
rules or combines all styles into one.Input:
CONFIG
HTML
CSS
or
Output:
Output without
mode: 'jit'
https://play.tailwindcss.com/6re84tZQjw?file=css
I'm a huge fan of tailwindcss and newly getting familiar with JIT so I appreciate any help or clarification that is offered!
The text was updated successfully, but these errors were encountered: