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
| $sets: ( | |
| (#e81e49, #f45e30, #fed02f, #58bd1b, #11b38f, #0bbfce, #2b6bd1, #833ec3, #d23ad0, #fa3c88), | |
| (#e81e49, #fed02f, #58bd1b, #2b6bd1, #833ec3, #fa3c88) | |
| ); |
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
| <ul class="list"> | |
| <li class="list_item">Item</li> | |
| <li class="list_item">Some more</li> | |
| <li class="list_item">I'm also here</li> | |
| <li class="list_item">We are a rainbow!</li> | |
| [ ... ] | |
| </ul> |
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
| .list_item:nth-of-type(1) { | |
| color: #e81e49; | |
| } | |
| .list_item:nth-of-type(2) { | |
| color: #f45e30; | |
| } | |
| .list_item:nth-of-type(3) { | |
| color: #fed02f; | |
| } | |
| .list_item:nth-of-type(4) { |
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
| .list_item:nth-last-of-type(-n+6):first-of-type { | |
| color: #e81e49; | |
| } | |
| .list_item:nth-last-of-type(-n+6):first-of-type ~ .list_item:nth-of-type(2) { | |
| color: #fed02f; | |
| } | |
| .list_item:nth-last-of-type(-n+6):first-of-type ~ .list_item:nth-of-type(3) { | |
| color: #58bd1b; | |
| } | |
| .list_item:nth-last-of-type(-n+6):first-of-type ~ .list_item:nth-of-type(4) { |
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
| @mixin settify($selector, $properties...) { | |
| [...] | |
| } |
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
| @for $i from 1 through (length($sets)) { | |
| [...] | |
| } |
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 $i == 1 { | |
| //Base selectors: first - largest - color set. | |
| } | |
| @else { | |
| //Rest of the color sets. | |
| } |
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 $i == 1 { | |
| @for $j from 1 through length(nth($sets, $i)) { | |
| [...] | |
| } | |
| } | |
| @else { | |
| @for $j from 1 through length(nth($sets, $i)) { | |
| [...] | |
| } | |
| } |
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
| &:nth-#{$selector}(#{$j}) { | |
| @each $property in $properties { | |
| #{$property}: nth(nth($sets, $i), $j); | |
| } | |
| } |
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 { |
OlderNewer