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 May 7, 2021
1 parent b175b28 commit aa4723f
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 aa4723f

Please sign in to comment.