Skip to content

Commit

Permalink
Fix media queries with jit and postcss7 (tailwindlabs#4034)
Browse files Browse the repository at this point in the history
  • Loading branch information
jscissr committed Apr 15, 2021
1 parent e5c41bb commit f195bac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jit/lib/generateRules.js
Expand Up @@ -109,7 +109,12 @@ function applyVariant(variant, matches, context) {
continue
}

let container = postcss.root({ nodes: [rule] })
let container = postcss.root()
if (typeof rule.clone === 'function') {
container.append(rule.clone())
} else {
container.append(rule)
}

function modifySelectors(modifierFunction) {
container.each((rule) => {
Expand Down

0 comments on commit f195bac

Please sign in to comment.