Changed Variant Generation to apply per selector in a ruleset (fixes #530)
This commit is contained in:
parent
a63c976dc7
commit
002a4ba90d
1 changed files with 6 additions and 4 deletions
|
|
@ -13,10 +13,12 @@ export default function generateVariantFunction(generator) {
|
|||
separator: escapeClassName(config.options.separator),
|
||||
modifySelectors: modifierFunction => {
|
||||
cloned.walkRules(rule => {
|
||||
rule.selector = modifierFunction({
|
||||
className: rule.selector.slice(1),
|
||||
selector: rule.selector,
|
||||
})
|
||||
rule.selectors = rule.selectors.map(selector =>
|
||||
modifierFunction({
|
||||
className: selector.slice(1),
|
||||
selector
|
||||
})
|
||||
)
|
||||
})
|
||||
return cloned
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue