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

Fix media queries with jit and postcss7 #4078

Merged
merged 1 commit into from Apr 23, 2021

Conversation

jscissr
Copy link
Contributor

@jscissr jscissr commented Apr 15, 2021

When using @tailwindcss/postcss7-compat and jit, media queries are not generated.

The problem is that this chunk of code: https://github.com/postcss/postcss/blob/8.2.10/lib/node.js#L44-L48
is missing in postcss 7: https://github.com/postcss/postcss/blob/7.0.35/lib/node.es6#L37
Which means that the parent of the rule is not set correctly, which then causes this bug.

This fixes #4034.

@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2021

Codecov Report

Merging #4078 (d889791) into master (b442c91) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

❗ Current head d889791 differs from pull request most recent head 7324128. Consider uploading reports for the commit 7324128 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4078      +/-   ##
==========================================
- Coverage   86.84%   86.83%   -0.02%     
==========================================
  Files         341      341              
  Lines        4835     4838       +3     
  Branches      919      920       +1     
==========================================
+ Hits         4199     4201       +2     
- Misses        561      562       +1     
  Partials       75       75              
Impacted Files Coverage Δ
jit/lib/generateRules.js 92.45% <75.00%> (-0.50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b442c91...7324128. Read the comment docs.

@bradlc bradlc merged commit ed684b0 into tailwindlabs:master Apr 23, 2021
@bradlc
Copy link
Contributor

bradlc commented Apr 23, 2021

Amazing, thank you! ❤️

@gilesbutler
Copy link

Awesome work, thanks guys 👍

@dave-calleja
Copy link

I still seem to have the same issue even after upgraded to 2.1.2. Using @tailwindcss/postcss7-compat. Am I missing something?

@kb1995
Copy link

kb1995 commented May 8, 2021

@dave-calleja I have the same issue. I'm using @tailwindcss/postcss7-compat and updated to latest version, but classes such as flex are not working for me

pinging @bradlc

@adamwathan
Copy link
Member

Hey! Please create a new issue and include a minimal reproduction, we don't actively monitor closed issues/PRs.

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 this pull request may close these issues.

JIT does not respect mobile-first order
7 participants