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

Error: SusyOne - List index is 2 but list is only 1 item long for `nth') when using @include susy-grid-background #395

Closed
mikeebee opened this issue Oct 16, 2014 · 11 comments

Comments

@mikeebee
Copy link

Hi, I've regressed from Susy2 back to SusyOne due to long compile times in Susy 2 and since updating to the latest Susy (from 1.0.9, where this settings worked) I'm getting an error.

error sass/styles.scss (Line 280 of /Users/Mike/.rvm/gems/ruby-2.1.1@global/gems/compass-core-1.0.1/stylesheets/compass/_support.scss: List index is 2 but list is only 1 item long for `nth')
Compilation failed in 1 files.
Warning: ↑

This is my container code

$susy_tablet: 8 768px;

.l_grid {
    min-width: 320px;
    @include container();
    @include susy-grid-background;
    @include at-breakpoint($susy_tablet){
        @include susy-grid-background;
    }
}

If I remove the second @include susy-grid-background; from inside the at-breakpoint() then there is no error, but my background grid still shows my default 12 columns.

These are all my grid settings

@import "susyone"

$column-width: 79px;
$gutter-width: 30px;
$grid-padding: 25px;
$container-style: magic;
$show-grid-backgrounds: true;
$grid-background-column-color: rgba(0,0,0,.1);
$total-columns: 12;
$susy_screen: 1280px 12;
$screen-columns: 12;
$susy_screen: 1280px 12;
$susy_tablet: 8 768px;
$tablet-columns: 8;
$susy_mobile: 6 600px;
$mobile-columns: 6;

susy (2.1.3)
sass (3.4.4)
compass (1.0.1)

Any ideas?

@zellwk
Copy link
Contributor

zellwk commented Oct 16, 2014

Susy 2 has a very different syntax compared to Susy 1.

Since you are still using code from susy 1, you can do either of these:

  1. change @import "susy" to @import "susyone". This will allow you to use back the same code.
  2. change your code to match Susy 2. That's more difficult, and will need you to read up more about Susy 2 :)

Does that help?

@mikeebee
Copy link
Author

Thanks for the tips zellwk but I've actually regressed to SusyOne due to long compile times in Susy 2 (~13 seconds Susy2, ~5 seconds SusyOne).

I already have @import "susyone", I've used Susy for a while so this code is from a tried and tested site, the only difference being that I've updated Susy, Sass and Compass to latest versions.

@zellwk
Copy link
Contributor

zellwk commented Oct 17, 2014

Man sorry I don't know whats wrong then :(

@mirisuzanne
Copy link
Member

This seems to be a bug somewhere in the Compass browser-support module (or our misuse of that module?). I'm digging into it.

@mirisuzanne
Copy link
Member

I was able to recreate this error in Compass, without any reference to Susy — so I filed the issue over there. Thanks for catching this and reporting it!

@mikeebee
Copy link
Author

Ah ok! Thanks Eric.

@webmasterpf
Copy link

i get the same after upgrading to susy2 but with older code written for susy 1, so @import:susyone; switch errors to warnings, but the compass error still the same:
http://stackoverflow.com/questions/26653313/issues-with-upgrading-gems
hope it will be fix because my project is actually frozen

@mikeebee
Copy link
Author

@webmasterpf Did you try removing the

@include susy-grid-background;

From inside any breakpoints? If you look at my original post, I’m able to run my project as normal except the background grid doesn’t change. The grid still works though!

Might get you moving until a proper fix is implemented.

@webmasterpf
Copy link

thanks, removing @include susy-grid-background; fix the issue, then i get another one about compass-recipes.

@chriseppstein
Copy link
Contributor

The compass issue is fixed, will be released soon.

@KittyGiraudel
Copy link
Contributor

As the Compass issue has been fixed 10 months ago, can we close this?

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

6 participants