We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work with styled-component v5, and I found that first selector will be modified, and this made the whole page's style broken.
Here is my test code
export function addCssScope(scopes: string[]) { // FORM: // https://github.com/Andarist/stylis-plugin-extra-scope/blob/master/src/index.js const extraScopePlugin: StylisPlugin = (context, content, selectors) => { if (context === -2) { console.log('[selectors]', selectors); console.log('[content] ', content); console.log('\n\n'); return; } if (context !== -1) { return; } console.log('[before] selectors', selectors); const selector = selectors[0]; selectors[0] = `.${scopes[0]} ${selector}`; for (let i = 1; i < scopes.length; i++) { selectors.push(`.${scopes[i]} ${selector}`); } console.log('[after] selectors', selectors); }; Object.defineProperty(extraScopePlugin, 'name', { value: 'addCssScopePlugin', }); return extraScopePlugin; } <StyleSheetManager target={container} stylisPlugins={plugins}> // ....... </StyleSheetManager>
The text was updated successfully, but these errors were encountered:
I'm experiencing the same issue, have you found any ideas why?
Sorry, something went wrong.
No branches or pull requests
Work with styled-component v5, and I found that first selector will be modified, and this made the whole page's style broken.
Here is my test code
The text was updated successfully, but these errors were encountered: