Created
February 9, 2015 17:34
-
-
Save mattdrose/64a609bbe33b446080bd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.11) | |
// Compass (v1.0.3) | |
// ---- | |
@import "compass/css3"; | |
@function remove($list, $value, $recursive: false) { | |
$result: (); | |
@for $i from 1 through length($list) { | |
@if type-of(nth($list, $i)) == list and $recursive { | |
$result: append($result, remove(nth($list, $i), $value, $recursive)); | |
} | |
@else if nth($list, $i) != $value { | |
$result: append($result, nth($list, $i)); | |
} | |
} | |
@return $result; | |
} | |
@function join($list, $glue: "", $trim: true, $is-nested: false) { | |
$result: null; | |
@if $trim { | |
$list: remove($list, "", true); | |
$list: remove($list, null, true); | |
} | |
@for $i from 1 through length($list) { | |
$e: nth($list, $i); | |
@if type-of($e) == list { | |
$result: $result#{join($e, $glue, $trim true)}; | |
} | |
@else { | |
$result: if($i != length($list) or $is-nested, $result#{$e}#{$glue}, $result#{$e}); | |
} | |
} | |
@return $result; | |
} | |
.test { | |
@include transition(opacity .25s ease); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List index is 1 but list has no items for `nth' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment