|
|
|
|
@ -238,13 +238,14 @@ const visitors = {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (relative_selector.selectors.some((s) => s.type === 'NestingSelector')) {
|
|
|
|
|
// clean every global selector attached to Nesting before bailing out
|
|
|
|
|
for (const selector of relative_selector.selectors) {
|
|
|
|
|
if (selector.type === 'PseudoClassSelector' && selector.name === 'global') {
|
|
|
|
|
remove_global_pseudo_class(selector);
|
|
|
|
|
}
|
|
|
|
|
// for any :global() at the middle of compound selector
|
|
|
|
|
for (const selector of relative_selector.selectors) {
|
|
|
|
|
if (selector.type === 'PseudoClassSelector' && selector.name === 'global') {
|
|
|
|
|
remove_global_pseudo_class(selector);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (relative_selector.selectors.some((s) => s.type === 'NestingSelector')) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -256,13 +257,6 @@ const visitors = {
|
|
|
|
|
|
|
|
|
|
context.state.specificity.bumped = true;
|
|
|
|
|
|
|
|
|
|
// for any :global() at the middle of compound selector
|
|
|
|
|
for (const selector of relative_selector.selectors) {
|
|
|
|
|
if (selector.type === 'PseudoClassSelector' && selector.name === 'global') {
|
|
|
|
|
remove_global_pseudo_class(selector);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let i = relative_selector.selectors.length;
|
|
|
|
|
while (i--) {
|
|
|
|
|
const selector = relative_selector.selectors[i];
|
|
|
|
|
|