-
Notifications
You must be signed in to change notification settings - Fork 464
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 ^3.0 error: invalid selector after #1122
Comments
Any chance you could narrow down the problem? There is a lot of code here, and there is even a partial imported. |
@hugogiraudel sorry for not more complete info. The repo for this code is css-smart-grid and line 33 is where it chokes. The missing imported variables are here: // 20px at 960px wide container, accounting for a 1/2 gutter width padding on the left and right of the container
$gutter: percentage(20px/940px);
// 60px at 960px wide container
$one-column: 6.3829787%;
// set this to the minimum width you want the columns to take effect at
$columns-break-point: 481px !default;
// set this to the maximum width you want .container to have
$container-max-width: 940px !default;
// set this to true to include support for CSS Flexbox (modern syntax).
$flexbox-support: true !default;
// a collection of the columns you want to build. the first parameter must be an integer of how many columns wide this instance is, followed by 1 or more class names to apply this width to.
$column-list: (2, "two") (3, "three", "one-fourth") (4, "four", "one-third") (5, "five") (6, "six", "one-half") (7, "seven") (8, "eight", "two-thirds") (9, "nine", "three-fourths") (10, "ten") (11, "eleven") (12, "twelve", "full") !default;
// a collection of the offsets you want to build. the first parameter must be an integer of how many columns wide this instance is offset, followed by 1 or more class names to apply this offset to.
$offset-list: (1, "one") (2, "two") (3, "three") (4, "four") (5, "five") (6, "six") (7, "seven") (8, "eight") (9, "nine") (10, "ten") (11, "eleven") !default; And here is a Sassmeister Gist http://sassmeister.com/gist/b4d0154f7704516cddec that seems to be compiling successfully in Libsass 3.1.0 |
I'm not able to reproduce this using commit: fec7377. Perhaps this has already been fixed on master. Copy/pasted from SassMeister
|
I am unable to reproduce this issue with Libsass@3.0.0-beta.6. Please try compiling this code directly with a fresh node-sass and see if the problem persist. mkdir ~/tmp/node-sass
cd ~/tmp/node-sass
npm install node-sass@3.0.0-beta.7
node -e "console.log(require('node-sass').renderSync({file:'path/to/file.scss'}))"
node -e "console.log(require('node-sass').renderSync({file:'path/to/file.scss'}).css.toString())" |
➜ tmp node -e "console.log(require('node-sass').info)"
node-sass 3.0.0-beta.7 (Wrapper) [JavaScript]
libsass 3.2.0-beta.6 (Sass Compiler) [C/C++]
➜ tmp node -e "console.log(require('node-sass').renderSync({file:'test.scss'}).css.toString())"
.customer-grid-item {
float: left;
margin: 0 0 0 2.12766%;
width: 6.38298%;
width: 24.93617%;
margin: 0 0 20px 0; }
.customer-grid-item:first-child {
margin-left: 0; }
html.flexbox .customer-grid-item {
float: none; } |
here is a demo repo https://github.com/dtothefp/node-sass-error-demo/blob/master/grunt/node-sass.js my mistake, it is a media query in the main bootstrapped if you add below to Sassmeister or just checkout my repo
node-sass will throw the error I'm referencing |
Can you provide a shortened example that illustrates the problem. Removing
|
@dtothefp as @drewwells points out, we cannot progress this issue as it stands. Noone one the Libsass team is familiar with project in question. Please supply a copy-pastable snippet of Sass code that produces the issue you're encountering. Only then can we begin to understand the actual problem at work here. |
@hugogiraudel @drewwells @xzyfer @stewsmith I've pinpointed the issue. If you reference the article http://hugogiraudel.com/2013/07/15/understanding-sass-lists/#section-4 about appending to sass lists you will see that the syntax below will work $pages: home, about, products, contact;
$selector: ();
@each $item in $pages {
$selector: append($selector, unquote('.#{$item} .nav-#{$item}'), comma);
} but the following syntax will break (and coincidentally the syntax used in the css-smart-grid mixin)
You can see an example in my sample repo https://github.com/dtothefp/node-sass-error-demo running |
@dtothefp thanks heaps for creating that test case. I can confirm this is fixed in Libsss 3.2.0 and will be in node-sass 3.0.0. |
@xzyfer thanks for the reply. Any idea when we can expect Libsass 3.2.0 and node-sass 3.0.0 to come out of beta? |
Soon. You can track the progress of 3.0.0 in sass/node-sass#904 |
I'm seeing this issue when trying to compile the following: @mixin margin-selectors($before:1em, $after:1em, $start:0px, $end:0px) {
-webkit-margin-before: $before;
-webkit-margin-after: $after;
-webkit-margin-start: $start;
-webkit-margin-end: $end;
}
@mixin not-selectable($value:none) {
user-select: $value;
}
@mixin input-placeholder-color($color) {
&::-webkit-input-placeholder,
&::-moz-placeholder, /* Firefox 19+ */ // <------------------ Error: invalid selector after ,
&:-moz-placeholder, /* Firefox 18- */
&:-ms-input-placeholder {
color: $color;
}
}
I'm running |
@jpdesigndev tracking that issue in #1208 |
I get this error compiling code:
Throws:
I'm running |
@filmic I can confirm this is an issue. Please open a new issue, this one is closed. |
@hugogiraudel I can confirm this is still an issue |
Yes this a known issue being tracked in #1260. |
Not sure if this is the right place to report this error but after upgrading to:
I'm getting the following errors
I did not have this problem on older versions for grunt-sass/node-sass/libsass
The mixins in question are here
The text was updated successfully, but these errors were encountered: