Skip to content

Instantly share code, notes, and snippets.

@pagelab
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pagelab/9619171 to your computer and use it in GitHub Desktop.
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/
$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