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

Compile function gets stuck if @import is used inside a media query #134

Open
sebastianwebb opened this issue Dec 21, 2020 · 3 comments
Open

Comments

@sebastianwebb
Copy link

Is there some way to debug the progress of the compile function? By enabling browser console logging or something?

I've run into an issue where the compile function gets stuck with the following invalid Sass:

@media (max-width: 600px) {

@import "scripts/test.scss";

The initial error message is

media query expression must begin with '('.

But then subsequent compile attempts (to fix the invalid code) never return anything more. It seems the compile callback function just doesn't run.

I hope you can replicate this issue and offer any advice. The contents of test.scss is:

div.test {
  color: blue;
}

Thanks for your time.
Sebastian

@rodneyrehm
Copy link
Member

Hey there!

Can you provide a test case for me to run and see where things go wrong?

Is the content of @import "scripts/test.scss"; irrelevant, and this fails as soon as you try to compile @media (max-width: 600px) { @import "dummy.scss"; }?

@sebastianwebb
Copy link
Author

Hey, thanks for getting back to me. I don't think it matters what the content of test.scss is. I initially encountered this with bootstrap, but then was able to replicate it by loading a simple file with the following content:

div.test {
  color: blue;
}

The key to triggering it seems to be a valid path to an import file inside the curly brackets of a media query.

Let me know if you need anything else from me.

Cheers!

@sebastianwebb
Copy link
Author

Hey, were you able to replicate this issue? Just wanted to make sure it isn't an issue specific to my implementation.

Thanks!

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