Last active
September 8, 2015 10:43
-
-
Save gunnarbittersmann/4d0a14a2ed3354c41ded 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@mixin nestedElements($element-type, $property, $values) | |
{ | |
$selector: $element-type; | |
@each $value in $values | |
{ | |
#{$selector} | |
{ | |
#{$property}: $value; | |
} | |
$selector: $selector ">" $element-type; | |
} | |
} | |
@include nestedElements(mark, background-color, red orange yellow green blue indigo violet); | |
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
mark { | |
background-color: red; | |
} | |
mark > mark { | |
background-color: orange; | |
} | |
mark > mark > mark { | |
background-color: yellow; | |
} | |
mark > mark > mark > mark { | |
background-color: green; | |
} | |
mark > mark > mark > mark > mark { | |
background-color: blue; | |
} | |
mark > mark > mark > mark > mark > mark { | |
background-color: indigo; | |
} | |
mark > mark > mark > mark > mark > mark > mark { | |
background-color: violet; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment