Created
June 18, 2014 14:41
-
-
Save micahgodbolt/ed1da4a306d55fd72683 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
<div></div> |
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
// ---- | |
// 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); | |
} |
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
div { | |
foo: green; | |
} |
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
<div></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment