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

[v2.1.1] With JIT disabled, precedence of extended variant classes is not properly compiled. #4038

Closed
amithm7 opened this issue Apr 11, 2021 · 1 comment · Fixed by #4273
Closed

Comments

@amithm7
Copy link

amithm7 commented Apr 11, 2021

What version of Tailwind CSS are you using?

v2.1.1

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

postcss-cli 8.3.1

What version of Node.js are you using?

v14.16.1

What browser are you using?

Chrome

What operating system are you using?

debian bullseye

Reproduction repository

https://github.com/amithm7/issue-tailwindcss-2.1-no-jit-build

Describe your issue

With TailwindCSS 2.1.1, when JIT mode is disabled, and using extended variants, precedence of classes are not properly compiled.

For example, here 'dark' variant is extended with 'display'.

And with JIT disabled, compiled in production environment, .hidden { display: none } class has higher precedence than @media (prefers-color-scheme: dark) { .dark\:block { display: block }}.

However with JIT enabled (see ./build-styles-jit.css), this issue doesn't exist. (Extended variants are not needed here anyway)

@adamwathan
Copy link
Member

Hey thanks for catching this! Will be fixed in v2.2, can play with it now by pulling in our canary release though:

npm install -D tailwindcss@canary

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