startae / hagrid

:straight_ruler: Hagrid is a mixin library for responsive websites and web applications.
https://hagrid.netlify.com/
MIT License
30 stars 3 forks source link

Breaks with libsass 3.3 #34

Closed fspoettel closed 8 years ago

fspoettel commented 8 years ago

The list handling in Lib-Sass 3.3.x seems to have changes, resulting in hagrid breaking with the error:

Error: index out of bounds for nth($list, $n)

It seems like the expression md 2/3 is not parsed as a string anymore, which results in the argument being not parsed as a nested list.

        @each $width in $widths {

            @if type-of($width) == number or $width == auto {
                #{$prop}: calculate-width($width);
                $width-detected: true;
            }

            @elseif $width == false {
                $width-detected: true;
            }

            @else {

                // * Warning $width here outputs "md"
               @warn $width;

                $key: nth($width, 1);
                $value: nth($width, 2);

                @if type-of($key) == number {
                    $value: nth($width, 1);
                    $key: nth($width, 2);
                }

                $bp: parse-breakpoint($key);

                @if $bp != false {
                    @include bp(#{$key}) {
                        #{$prop}: calculate-width($value);
                    }
                }
                @else {
                    @warn "You are trying to assign a width to an unknown, unquoted breakpoint: #{$key}";
                }
            }
fspoettel commented 8 years ago

@renatocarvalho