Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Created June 18, 2014 14:41
Show Gist options
  • Save micahgodbolt/ed1da4a306d55fd72683 to your computer and use it in GitHub Desktop.
Save micahgodbolt/ed1da4a306d55fd72683 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// A great way to create a map of lists.
// No need to comma delimit the lists. A line break works as a space.
// This way, adding items does not require any additional syntax
$my-list: (
"List One":
red
green
blue
,
"List Two":
cat
dog
horse
,
);
div {
// We can map-get one of the lists of words,
// and then use string function nth to grab the one we want
foo: nth(map-get($my-list, "List One"), 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment