Don't propogate apply !important option to non-apply rules (#2376)
* Don't propogate apply !important option to non-apply rules Fixes #2362. * Update changelog
This commit is contained in:
parent
4e322b2cbd
commit
416fb4d06b
3 changed files with 52 additions and 3 deletions
|
|
@ -238,15 +238,13 @@ function processApplyAtRules(css, lookupTree, config) {
|
|||
: util => util.rule.nodes.forEach(n => afterRule.append(n.clone()))
|
||||
)
|
||||
|
||||
rulesToInsert.push(afterRule)
|
||||
|
||||
const { nodes } = _.tap(postcss.root({ nodes: rulesToInsert }), root =>
|
||||
root.walkDecls(d => {
|
||||
d.important = important
|
||||
})
|
||||
)
|
||||
|
||||
const mergedRules = mergeAdjacentRules(nearestParentRule, nodes)
|
||||
const mergedRules = mergeAdjacentRules(nearestParentRule, [...nodes, afterRule])
|
||||
|
||||
applyRule.remove()
|
||||
parent.after(mergedRules)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue