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

Compiler crashes with orphaned :global in CSS #4930

Closed
dimfeld opened this issue May 29, 2020 · 1 comment · Fixed by #4936
Closed

Compiler crashes with orphaned :global in CSS #4930

dimfeld opened this issue May 29, 2020 · 1 comment · Fixed by #4936
Labels

Comments

@dimfeld
Copy link
Contributor

dimfeld commented May 29, 2020

Describe the bug

CSS like this causes the Svelte compiler to crash:

<style>
  .codemirror-container.flex :global {padding:0}
</style>

To Reproduce
https://svelte.dev/repl/c0b2792175ab48c0afb84b01b9bfa247?version=3.23.0

Expected behavior
Throw an error instead of crashing.

Severity

Very minor since it's invalid syntax and nobody would intentionally write this. This happened because I had purgecss in my postcss preprocessor config and I needed to whitelist some classes.

@Conduitry
Copy link
Member

This now throws a more helpful error in 3.23.1 - https://svelte.dev/repl/c0b2792175ab48c0afb84b01b9bfa247?version=3.23.1

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

Successfully merging a pull request may close this issue.

3 participants