Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

invalid selector after #1174

Closed
rapitkan opened this issue Sep 24, 2015 · 8 comments
Closed

invalid selector after #1174

rapitkan opened this issue Sep 24, 2015 · 8 comments

Comments

@rapitkan
Copy link

node-sass (node_modules/node-sass/lib/index.js:277:32) gives an error 'invalid selector after'.

This is the scss code it tries to translate:

@mixin createSelector($selectorName, $properties) {
    .#{$selectorName} {
        @each $property, $value in $properties {
            $property: $value;
        }
    }
}

And the problematic character is a dot (line 2 in the code)

I'm using [email protected] which uses [email protected]

@saper
Copy link
Member

saper commented Sep 24, 2015

I have some trouble reproducing this, how are you invoking that mixin?

@rapitkan
Copy link
Author

For example: @include createSelector('Px-xs', ('padding-left': 1em, 'padding-right': 1em));

@saper
Copy link
Member

saper commented Sep 24, 2015

Both Ruby Sass and libsass master generate empty output for me (with our without a dot)

@rapitkan
Copy link
Author

I'm developing this library: https://github.com/niant/once and we can't update to the recent gulp-sass version (which uses node-sass 3.3.3) because of we'll get the 'invalid selector after' error that points to node-sass.

@saper
Copy link
Member

saper commented Sep 24, 2015

I need a code that generates this error, please...

@rapitkan
Copy link
Author

We are solving the problem and it seems that the error is thrown without gulp-sass. But unfortunately I don't have a proper code to give you just now. We'll debug more and get back to this. Big thanks for helping.

@saper
Copy link
Member

saper commented Sep 24, 2015

We are solving the problem and it seems that the error is thrown
without gulp-sass. But unfortunately I don't have a proper code to
give you just now. We'll debug more and get back to this. Big thanks
for helping.

I have tried node-sass 3.3.3 (libsass 3.2.5) and 3.4.0.beta (libsass 3.3.0.beta2)
and both give me an empty output... (and Ruby Sass as well)

@rapitkan
Copy link
Author

Hi! We got it fixed by interpolating parameters. You can find the changes here: niant/once@1ecf964 It's still unknown why it didn't work without interpolation.

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

No branches or pull requests

2 participants