Skip to content

Instantly share code, notes, and snippets.

@scottkellum
Created November 9, 2014 17:42
Show Gist options
  • Save scottkellum/6c97b3bfd69ecb3ef6ed to your computer and use it in GitHub Desktop.
Save scottkellum/6c97b3bfd69ecb3ef6ed to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$list: 1 2 3 4 5 6 7 8 9;
debug {
n2: nth($list, 2); // ok, makes sense
n-2: nth($list, -2); // 2 from the end, ok.
//n0: nth($list, 0); // This fails.
// This is really annoying when you need to programatically
// traverse lists in multiple directions.
// Easy enough to work around but takes more code.
}
debug {
n2: 2;
n-2: 8;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment