Skip to content

Commit 5a6a3f1

Browse files
jscissradamwathan
authored andcommitted
Fix media queries with jit and postcss7 (#4034) (#4078)
1 parent 6e70edc commit 5a6a3f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jit/lib/generateRules.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ function applyVariant(variant, matches, context) {
109109
continue
110110
}
111111

112-
let container = postcss.root({ nodes: [rule] })
112+
let container = postcss.root()
113+
if (typeof rule.clone === 'function') {
114+
container.append(rule.clone())
115+
} else {
116+
container.append(rule)
117+
}
113118

114119
function modifySelectors(modifierFunction) {
115120
container.each((rule) => {

0 commit comments

Comments
 (0)