Fix media queries with jit and postcss7 (#4034) (#4078)

This commit is contained in:
Jan Schär 2021-04-23 19:59:36 +02:00 • committed by Adam Wathan
parent b175b2802e
commit aa4723f970

View file

@ -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) => {