Skip to content

Instantly share code, notes, and snippets.

@pentzzsolt
Created January 4, 2016 16:01
Show Gist options
  • Select an option

  • Save pentzzsolt/ae1ce39c69c7ee9eb6f0 to your computer and use it in GitHub Desktop.

Select an option

Save pentzzsolt/ae1ce39c69c7ee9eb6f0 to your computer and use it in GitHub Desktop.
Example mixin for the Settify mixin's blog post on Medium.com Raw
@if $j == 1 {
&:nth-last-#{$selector}(-n+#{length(nth($sets, $i))}):first-#{$selector} {
@each $property in $properties {
#{$property}: nth(nth($sets, $i), $j);
}
}
}
@else {
&:nth-last-#{$selector}(-n+#{length(nth($sets, $i))}):first-#{$selector} ~ #{nth(nth(&, 1), length(nth(&, 1)))}:nth-#{$selector}(#{$j}) {
@each $property in $properties {
#{$property}: nth(nth($sets, $i), $j);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment