Hi,
I found a bug that make it impossible to use the @scope rule in my case:
@scope (.innerActionsWrapper) to (.inputInnerButtons > * > *, :global(.tkx-inputComponentButtons) > * > *) {
--button-variant: 'transparent';
}
This line do not split by token, it splits by word. The word "to" is included in the selector itselft also.
So splitting by token will fix this issue
const splitScopeParams = (params) => {
const ast = valueParser(params);
const before = [];
const after = [];
let current = before;
for (const node of ast.nodes) {
if (node.type === 'word' && node.value === 'to') {
current = after;
continue;
}
current.push(node);
}
return [
valueParser.stringify(before).trim(),
valueParser.stringify(after).trim()
];
}
...
atRule.params = splitScopeParams(atRule.params)
.map((item) => {
...
Thanks
Hi,
I found a bug that make it impossible to use the @scope rule in my case:
postcss-modules-local-by-default/src/index.js
Line 627 in 106cedd
This line do not split by token, it splits by word. The word "to" is included in the selector itselft also.
So splitting by token will fix this issue
Thanks