Skip to content

Commit

Permalink
Fix media queries with jit and postcss7 (#4034) (#4078)
Browse files Browse the repository at this point in the history
  • Loading branch information
jscissr authored and adamwathan committed Apr 23, 2021
1 parent 6e70edc commit 5a6a3f1
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 5a6a3f1

Please sign in to comment.