Refactor insertBefore references to simpler before
This commit is contained in:
parent
cc208ea422
commit
6bbbe47e9b
4 changed files with 4 additions and 7 deletions
|
|
@ -57,7 +57,7 @@ export default function(options) {
|
|||
flex(options),
|
||||
zIndex(options),
|
||||
])
|
||||
css.insertBefore(atRule, responsive(utilities))
|
||||
atRule.before(responsive(utilities))
|
||||
atRule.remove()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default postcss.plugin('tailwind-apply', function(css) {
|
|||
})
|
||||
})
|
||||
|
||||
rule.insertBefore(atRule, decls)
|
||||
atRule.before(decls)
|
||||
|
||||
atRule.params = customProperties.join(' ')
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@ export default function(options) {
|
|||
]
|
||||
})
|
||||
|
||||
const nodes = atRule.nodes
|
||||
const rules = cloneNodes(nodes)
|
||||
|
||||
atRule.parent.insertBefore(atRule, nodes)
|
||||
atRule.before(cloneNodes(atRule.nodes))
|
||||
|
||||
atRule.remove()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default function(options) {
|
|||
css.walkAtRules('responsive', atRule => {
|
||||
const nodes = atRule.nodes
|
||||
rules.push(...cloneNodes(nodes))
|
||||
css.insertBefore(atRule, nodes)
|
||||
atRule.before(nodes)
|
||||
atRule.remove()
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue