Last active
August 29, 2015 13:57
-
-
Save pagelab/9619171 to your computer and use it in GitHub Desktop.
Using multidimensional lists in Sass to generate styles for different tumblr posts. http://hugogiraudel.com/2013/07/15/understanding-sass-lists/
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
$types: text #474747, photo #D86043, photoset #D86043, quote #F19F35, link #57BC8A, chat #4EA8D7, video #77828D, audio #AB7DC2, answer #036564; | |
@each $type in $types { | |
.post-type-#{nth($type, 1)} .post-icon { | |
background: nth($type, 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment