Created
January 4, 2016 16:01
-
-
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
This file contains hidden or 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
| @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