-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
:global having only 1 selector is a BREAKING change #6477
Comments
@ignatiusmb letting you know |
For background: This was originally disallowed because #5907 was opened asking for different behavior in this situation that we didn't want to allow, and so we decided to make it a compiler error rather than have confusing behavior in that situation. |
Thanks for letting me know. That commit is still unreleased, and your example I see you're using the latest version, if what you meant is v3.38.3, then #6428 is the corresponding PR which is opened to close the issue linked above. I don't think it is necessarily "blocking all usage of svelte", and I think it's a good decision to disallow it as it doesn't really match what we expect as described in the issue. Although, I do agree that it might better released as v3.39.0 as it breaks most v3.38.x apps. |
In true semantic versioning it should have been a v4 change, but yes at least certainly a minor version if the major version is tied to marketing. |
It broke my usage of it, which isn't multiple selectors but refining a selector. I'm not even sure this PR intended to error on this kind of usage |
Please provide a reproducible code snippet with a complete CSS selector, not just parts of it. Both your given snippets don't give an error for me, so there must be more to it. |
I can confirm child selectors like above still work for me on the latest version as well. |
I confirm that this change throw an error when using MULTIPLE selectors in a list comma separated like this: Until 3.38.2 (https://svelte.dev/repl/2eacdbae6cdc4a9f906516a9dbe7936d?version=3.38.2) it was working well. This is breaking change for me since I use this in many components )-; and the doc does not specify this limitation. |
Your given code snippet is indeed something that would have worked correctly before and gave correct output. So I think we should - for semver reasons - revert the change for this specific case where the css selectors consists of a single |
The specific case where |
Describe the bug
this: 8c3fb92
this breaks usable and known behavior.
Reproduction
every
:global(.class1 .class2)
or similar is now broken.Logs
No response
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: