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

libsass throws on non-selector psuedo selector params #2944

Closed
jquense opened this issue Jul 9, 2019 · 4 comments · Fixed by #2990
Closed

libsass throws on non-selector psuedo selector params #2944

jquense opened this issue Jul 9, 2019 · 4 comments · Fixed by #2990

Comments

@jquense
Copy link
Contributor

jquense commented Jul 9, 2019

input.scss

This is a hacky syntax that css-modules uses to define dependecies across files, in general we'd want sass to ignore it, which is what the other sasses do.

:import("./foo") {
  color: red;
}

Actual results

libsass 3.5.4

Invalid CSS after ":import(": expected selector, was '"./foo") {' on line 1 at column 1

Expected result

This is what dart and ruby sass compile to

:import("./foo") {
  color: red;
}
@nschonni
Copy link
Collaborator

nschonni commented Jul 9, 2019

@nex3 should Dart be erroring here too?

@jquense
Copy link
Contributor Author

jquense commented Jul 10, 2019

ruby also allows this. Ideally (for me) libsass would NOT error. I was expecting it to behave more like css parsers and just ignore stuff it doesn't understand. I realize why sass might not do that tho. In our case this is more about being compatible with the very limited pseudo syntax css-modules requires

@nex3
Copy link
Contributor

nex3 commented Jul 10, 2019

@nschonni No; unknown pseudo selectors with arguments should allow a <declaration-value> (effectively allowing any contents).

@jquense
Copy link
Contributor Author

jquense commented Sep 11, 2019

Happy to try and fix this myself. Dug into it a bit and generally identified where to make the change, but can't figure out how to consume the the content, or what it should be stored in, same as css custom property value?

I'll add that i'm a JS dev not a Cpp one, so please excuse me if I'm making some obvious blunder !

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

Successfully merging a pull request may close this issue.

4 participants