Ensure all selectors in a rule receive important scope
This commit is contained in:
parent
19c74b106a
commit
763ee71033
2 changed files with 30 additions and 4 deletions
|
|
@ -59,7 +59,9 @@ export default function(plugins, config) {
|
|||
if (config.important === true) {
|
||||
rule.walkDecls(decl => (decl.important = true))
|
||||
} else if (typeof config.important === 'string') {
|
||||
rule.selector = increaseSpecificity(config.important, rule.selector)
|
||||
rule.selectors = rule.selectors.map(selector => {
|
||||
return increaseSpecificity(config.important, selector)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue