Skip to content
New issue

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

Discussion: ":root" pseudo-class #12

Open
rr-justin-hanselman opened this issue Mar 22, 2021 · 1 comment
Open

Discussion: ":root" pseudo-class #12

rr-justin-hanselman opened this issue Mar 22, 2021 · 1 comment

Comments

@rr-justin-hanselman
Copy link

Hello,

I have been using this plugin for a while and ran into an ambiguity with chakra-ui. Chakra-ui by default, converts all shared variables in js to css variables in a global file. These variables are under the ":root" pseudo class.

The feature-request/discussion:

Should ":root" be excluded from the scope prepending or should it be replaced with the scope completely?

From a correctness standpoint, replacement makes sense to me, however, certain ponyfills other scripts limit their scope to the general ":root" case. Part of me in inclined to have a configuration option like: "scopeRootPseudoClass" that can be configured.

Once this discussion is confirmed, I can go ahead and submit the PR if this is deemed useful!

@Andarist
Copy link
Owner

while you have faced this issue with :root, the same would happen for html, body and similar selectors. It seems impractical to cover all possibilities :thinking_face:

I'm not saying yes just yet - but let's try making a PR and we'll discuss this further then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants