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

"List index is 2 but list is only 1 item long for nth'" in intersect-browser-ranges()` #1853

Closed
mirisuzanne opened this issue Oct 17, 2014 · 0 comments

Comments

@mirisuzanne
Copy link
Member

To reproduce:

// An actual use-case that demonstrates the problem
.use-case {
  @include with-browser-ranges(css-mediaqueries) {
    @include background-image(linear-gradient(red, blue));
  }
}

// A simplification of the issue
$ranges: (ie: "9" "11");
$new-ranges: (ie: "9");
@debug intersect-browser-ranges($ranges, $new-ranges);

At some point in the use-case, (ie: "9", opera: "9.5-9.6") is passed into intersect-browser-ranges() for the $new-ranges argument. The error comes from the single version number. Is that a mistake, or an edge-case that intersect-browser-ranges should support?

If the latter, I can submit a patch:

// support.scss line 280
// we may need to to the same for line 278 ($old-max)?
$new-max: if(length($new-range) > 1, nth($new-range, 2), $new-min);

This is the cause of oddbird/susy#395

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

1 participant