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

Svelte 5. relative attribute selector, inside a :global(...) selector, is being scoped #11707

Closed
madacol opened this issue May 20, 2024 · 0 comments · Fixed by #11713
Closed

Comments

@madacol
Copy link

madacol commented May 20, 2024

Describe the bug

I have this style

details > :global(summary) {
    &:hover {
        opacity: 0.7;
    }
}

which gets compiled to:

details.svelte-koe03u > summary {
    &:where(.svelte-koe03u):hover {
        opacity: 0.7;
    }
}

I believe that where(...) shouldn't be there because & refers to a :global(...) selector

I have tried changing &:hover to &:global(:hover) , :global(&:hover) , :global(&):hover and even wrapping it in a :global { ... } but no luck

Reproduction

REPL: https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA41QwWqEMBD9lSGUoiDaW8G1soVe9htqD66O3UCSSZO4IOK_N9HsWtpL55R58968vJnZwAVaVr7PTLUSWcletWYZc5MOjb2icOh7S6PpAlLZznDt6kY1jktNxsEbupYLC4MhCQ3Liwjkm7phjaqKXaaqOF93VHaUsjVTfRpgohEudEUDEjM4gb3QKHo4Y0cSwf_TAun2a0S_LqrWFboWZFAC1x6uCl0Hw5uJ_7ykng8ce1Y6M-KS3bNGzv_ygq-OlHUwdxcueoNqgRd40Ia0TdLD75T9PWVQzkfP7320mzZJl6DYWb6zbhIYBXEANZSfgs6tSGLmFOaNEeqx3A72Awrlz9RxN5XwlD8f9tGyPVfjzevvdT6WbxP5sawVAgAA

Logs

No response

System Info

n/a

Severity

annoyance

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

Successfully merging a pull request may close this issue.

1 participant