{"id":15339,"date":"2016-08-23T06:30:21","date_gmt":"2016-08-23T12:30:21","guid":{"rendered":"http:\/\/vanseodesign.com\/?p=15339"},"modified":"2016-06-16T17:15:48","modified_gmt":"2016-06-16T23:15:48","slug":"sass-maps","status":"publish","type":"post","link":"https:\/\/vanseodesign.com\/css\/sass-maps\/","title":{"rendered":"Building Better Data Structures With Sass Maps"},"content":{"rendered":"<p>One downside of working with lists in Sass is you have to access values by an index you may not know. Maps solve that problem and allow you to access values based on key names you assign to them.<\/p>\n<p><!--more--><\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg\" alt=\"Map showing Italy\" width=\"660\" height=\"409\" class=\"aligncenter size-full wp-image-15340\" srcset=\"https:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg 660w, https:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy-300x186.jpg 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n<p>I\u2019ve been talking about <a href=\"http:\/\/vanseodesign.com\/css\/sass-data-types-operators-functions\/\">data types, operators, and functions<\/a> for awhile now, having covered <a href=\"http:\/\/vanseodesign.com\/css\/sass-numbers\/\">numbers<\/a>, <a href=\"http:\/\/vanseodesign.com\/css\/sass-strings\/\">strings<\/a>, <a href=\"http:\/\/vanseodesign.com\/css\/sass-colors-part-1\/\">colors<\/a>, <a href=\"http:\/\/vanseodesign.com\/css\/sass-colors-part-2\/\">colors again<\/a>, <a href=\"http:\/\/vanseodesign.com\/css\/sass-lists\/\">lists<\/a> and <a href=\"http:\/\/vanseodesign.com\/css\/sass-list-functions\/\">list functions<\/a>. This post brings us to the last data type, maps.<\/p>\n<p>Maps are similar to lists, but they take lists one better. Instead of values being stored only with a numbered index, each value is associated with a key name. That allows you to store data in a way that makes it easier to retrieve and use.<\/p>\n<h2 id=\"sassmaps\">Sass Maps<\/h2>\n<p>Where Sass lists are similar to the generic arrays of most programming languages, <a href=\"http:\/\/webdesign.tutsplus.com\/tutorials\/an-introduction-to-sass-maps-usage-and-examples--cms-22184\">Sass maps<\/a> are similar to associative arrays. They allow you to associate every value with a keyword or key name so the value can be referenced by name instead of by a numbered index.<\/p>\n<p>When you declare a map you declare key: value pairs as opposed to values only.<\/p>\n<p>[code type=css]<br \/>\n$map: (key1: value1, key2: value2, key3: value3);<br \/>\n[\/code]<\/p>\n<p>Unlike lists, the parenthesis are necessary and you must separate each key: value pair with a comma. You can, however, use multiple lines and you\u2019ll likely want to for maps containing more than a few key: value pairs.<\/p>\n<p>[code type=css]<br \/>\n$map: (<br \/>\n  key1: value1,<br \/>\n  key2: value2,<br \/>\n  key3: value3<br \/>\n);<br \/>\n[\/code]<\/p>\n<p>The keys and values can be any object in Sass and while each key can only have a single value associated with it, the values can be lists of values. You can also associate any value with more than one key.<\/p>\n<p>Like lists, maps have no special operators associated with them. You use map functions to manipulate maps.<\/p>\n<p>Maps can be thought of as a special type of list so all maps are also lists. The reverse isn\u2019t true. Each key\/value pair in a map is treated as a nested list when a map is used in a list function. This means all the list functions can also be used to manipulate maps further increasing they ways you can work with maps.<\/p>\n<p>[code type=css]<br \/>\n$map: (key1: value1, key2: value2, key3: value3);<br \/>\n[\/code]<\/p>\n<p>Here key1: value1 becomes one nested list, key2: value2 another and so on. The first index of $map would be the list key1: value1. Each successive index is the next key\/value pair interpreted as another nested list.<\/p>\n<p>One downside to maps is they have no CSS equivalent and so you can\u2019t <a href=\"http:\/\/vanseodesign.com\/css\/introduction-to-sass-part2\/\">directly output<\/a> a map as CSS. Trying to do so will produce an error. Instead you want to use the inspect($value) function, which converts $value into a string that can be output to CSS. You can, however, directly output the value part of a key\/value pair as CSS as we\u2019ll see momentarily.<\/p>\n<h2 id=\"mapfunctions\">Map Functions<\/h2>\n<p>Like lists, maps are immutable. <a href=\"http:\/\/sass-lang.com\/documentation\/Sass\/Script\/Functions.html#map-functions\">Map functions<\/a> return a new map rather than changing the existing map. If you want to save a copy of the returned map, you\u2019ll need to assign the returned key\/value pairs to a new map.<\/p>\n<p>To find the value of a known key you can use the <strong>map-get($map, $key)<\/strong> function. In the following example I created a map named $margin with four key\/value pairs for margin-top, margin-right, etc. I use the map-get() function to find the value for the margin-right key and then set it as the right margin of an h1.<\/p>\n<p>[code type=css]<br \/>\n$margin: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>h1 {<br \/>\n margin-right: map-get($margin, margin-right);<br \/>\n}<br \/>\n[\/code]<\/p>\n<p>The Sass compiles to:<\/p>\n<p>[code type=css]<br \/>\nh1 {<br \/>\n margin-right: 20px;<br \/>\n}<br \/>\n[\/code]<\/p>\n<p>When <a href=\"http:\/\/www.sitepoint.com\/using-sass-maps\/\">using a map<\/a> in a function or mixin, you may not know the key names in advance. In that case you can get a list of all the keys a map contains with the <strong>map-keys($map)<\/strong> function.<\/p>\n<p>[code type=css]<br \/>\n$margin: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>map-keys($margin) => margin-top, margin-right, margin-bottom, margin-left<br \/>\n[\/code]<\/p>\n<p>Similarly if you want a list of all the values in a map you can use the <strong>map-values($map)<\/strong> function.<\/p>\n<p>[code type=css]<br \/>\n$margin: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>map-values($margin) => 10px, 20px, 30px, 40px<br \/>\n[\/code]<\/p>\n<p>Instead of getting a complete list of keys you can test to see if a specific key exists using the <strong>map-has-key($map, $key)<\/strong> function.<\/p>\n<p>[code type=css]<br \/>\n$margin: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>map-has-key($margin, margin-left) => true<br \/>\nmap-has-key($margin, margin-side) => false<br \/>\n[\/code]<\/p>\n<p>You aren\u2019t limited to reading the keys and values of maps or testing to see if certain keys are present. You can remove key\/value pairs with the <strong>map-remove($map, $keys\u2026)<\/strong> function.<\/p>\n<p>[code type=css]<br \/>\n$margin: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>map-remove($margin, margin-top, margin-bottom) => (margin-right: 20px, margin-left: 40px)<br \/>\n[\/code]<\/p>\n<p>As I mentioned earlier, the returned map is different than the original, if you want to save it you need to assign the returned values to a new map.<\/p>\n<p>[code type=css]<br \/>\n$margin-2: map-remove($margin, margin-top, margin-bottom);<br \/>\n[\/code]<\/p>\n<p>$margin&#8211;2 would then contain only the remaining two key\/value pairs.<\/p>\n<p>[code type=css]<br \/>\n$margin-2 (<br \/>\n  margin-right: 20px,<br \/>\n  margin-left: 40px<br \/>\n);<br \/>\n[\/code]<\/p>\n<p>If you want to add items to a map you can use the <strong>map-merge($map1, $map2)<\/strong> function, which combines two maps, adding the second one to the first one.<\/p>\n<p>[code type=css]<br \/>\n$margin-1: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px<br \/>\n);<\/p>\n<p>$margin-2: (<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>$margin-3: map-merge($margin-1, $margin-2);<br \/>\n$margin-4: map-merge($margin-2, $margin-1);<br \/>\n[\/code]<\/p>\n<p>This would lead to the following being stored in $margin-3 and $margin-4.<\/p>\n<p>[code type=css]<br \/>\n$margin-3: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>$margin-3: (<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px,<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px<br \/>\n);<br \/>\n[\/code]<\/p>\n<p>One last function is the <strong>keywords($args)<\/strong> function, which you might use to get a map of named arguments that have been passed to a function or mixin.<\/p>\n<p>In the following example I created a <a href=\"http:\/\/vanseodesign.com\/css\/sass-the-mixin-directive\/\">mixin<\/a> that takes some number of $arguments. I also created a map of $margins that should look familiar by now. Finally I included the $margins map as the $arguments passed to the mix.<\/p>\n<p>[code type=css]<br \/>\n@mixin margin($args&#8230;) {<br \/>\n  @debug keywords($args);   \/\/ (margin-top: 10px, margin-right: 20px, margin-bottom: 30px, margin-left: 40px)<br \/>\n}<\/p>\n<p>$margins: (<br \/>\n margin-top: 10px,<br \/>\n margin-right: 20px,<br \/>\n margin-bottom: 30px,<br \/>\n margin-left: 40px<br \/>\n);<\/p>\n<p>@include margin($margins);<br \/>\n[\/code]<\/p>\n<p>What you should note is the use of keywords($args). <a href=\"http:\/\/vanseodesign.com\/css\/sass-at-rules-and-directives\/\">@debug<\/a> prints the results to the standard error output stream and what\u2019s on the right side of the \/\/ is what would be output.<\/p>\n<p>The function returns the key\/value pairs as a string and not a map. Notice that the $ before the values has been removed in the output. I\u2019m not entirely sure when or if you would use the keywords($args) function aside from debugging, but it\u2019s there for you to use.<\/p>\n<h2 id=\"closingthoughts\">Closing Thoughts<\/h2>\n<p><a href=\"http:\/\/clubmate.fi\/sass-maps-syntax-examples-and-good-things\/\">Sass maps<\/a> are a special kind of nested list, akin to an associative array. They store key\/value pairs, which makes it easy to find the values of specific keys, instead of having to know the index of the value you want to access.<\/p>\n<p>Because maps are also lists any list function will work with a map in addition to the functions specific to maps. Each key\/value pair is treated as a nested list when using list functions on maps.<\/p>\n<p>At times you might have wondered through this series when would you work with these data types and use the operators and functions Sass provides to manipulate them. The color data type has some built-in functions that you probably found useful, but what about the other data types?<\/p>\n<p>The answer is when you write your own mixins or custom functions, particularly when they include control directives for things like telling your code to do this under these conditions and do that as long as those conditions last. The next couple of weeks I\u2019ll look at control directives in Sass and then I\u2019ll finish up showing you how to create your own custom functions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One downside of working with lists in Sass is you have to access values by an index you may not know. Maps solve that problem and allow you to access values based on key names you assign to them.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[214,126],"series":[],"class_list":["post-15339","post","type-post","status-publish","format-standard","hentry","category-css","tag-maps","tag-sass"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building Better Data Structures With Sass Maps<\/title>\n<meta name=\"description\" content=\"Sass maps are similar to lists, but better. They&#039;re like the associative arrays of most programming languages with keys to make values easier to retrieve.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vanseodesign.com\/css\/sass-maps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building Better Data Structures With Sass Maps\" \/>\n<meta property=\"og:description\" content=\"Sass maps are similar to lists, but better. They&#039;re like the associative arrays of most programming languages with keys to make values easier to retrieve.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vanseodesign.com\/css\/sass-maps\/\" \/>\n<meta property=\"og:site_name\" content=\"Vanseo Design\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-23T12:30:21+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg\" \/>\n<meta name=\"author\" content=\"Steven Bradley\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Steven Bradley\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/\"},\"author\":{\"name\":\"Steven Bradley\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/#\\\/schema\\\/person\\\/470cda6ba835fb52596b2e26bcbd8fe4\"},\"headline\":\"Building Better Data Structures With Sass Maps\",\"datePublished\":\"2016-08-23T12:30:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/\"},\"wordCount\":1346,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/vanseodesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/map-italy.jpg\",\"keywords\":[\"maps\",\"sass\"],\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/\",\"url\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/\",\"name\":\"Building Better Data Structures With Sass Maps\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/vanseodesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/map-italy.jpg\",\"datePublished\":\"2016-08-23T12:30:21+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/#\\\/schema\\\/person\\\/470cda6ba835fb52596b2e26bcbd8fe4\"},\"description\":\"Sass maps are similar to lists, but better. They're like the associative arrays of most programming languages with keys to make values easier to retrieve.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#primaryimage\",\"url\":\"http:\\\/\\\/vanseodesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/map-italy.jpg\",\"contentUrl\":\"http:\\\/\\\/vanseodesign.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/map-italy.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/sass-maps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vanseodesign.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\",\"item\":\"https:\\\/\\\/vanseodesign.com\\\/css\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Building Better Data Structures With Sass Maps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/#website\",\"url\":\"https:\\\/\\\/vanseodesign.com\\\/\",\"name\":\"Vanseo Design\",\"description\":\"Helping you build search engine friendly websites\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vanseodesign.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/vanseodesign.com\\\/#\\\/schema\\\/person\\\/470cda6ba835fb52596b2e26bcbd8fe4\",\"name\":\"Steven Bradley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"\\\/\\\/www.gravatar.com\\\/avatar\\\/0f47bf400c3c1bafe06ee2884405baaa?s=96&#038;r=pg&#038;d=https%3A%2F%2Fvanseodesign.com%2Fblog%2Fwp-content%2Fthemes%2Fvanseo-design%2Fimages%2Fgravatar.png\",\"url\":\"\\\/\\\/www.gravatar.com\\\/avatar\\\/0f47bf400c3c1bafe06ee2884405baaa?s=96&#038;r=pg&#038;d=https%3A%2F%2Fvanseodesign.com%2Fblog%2Fwp-content%2Fthemes%2Fvanseo-design%2Fimages%2Fgravatar.png\",\"contentUrl\":\"\\\/\\\/www.gravatar.com\\\/avatar\\\/0f47bf400c3c1bafe06ee2884405baaa?s=96&#038;r=pg&#038;d=https%3A%2F%2Fvanseodesign.com%2Fblog%2Fwp-content%2Fthemes%2Fvanseo-design%2Fimages%2Fgravatar.png\",\"caption\":\"Steven Bradley\"},\"sameAs\":[\"https:\\\/\\\/www.vanseodesign.com\\\/about\\\/\"],\"url\":\"https:\\\/\\\/vanseodesign.com\\\/author\\\/vangogh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building Better Data Structures With Sass Maps","description":"Sass maps are similar to lists, but better. They're like the associative arrays of most programming languages with keys to make values easier to retrieve.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vanseodesign.com\/css\/sass-maps\/","og_locale":"en_US","og_type":"article","og_title":"Building Better Data Structures With Sass Maps","og_description":"Sass maps are similar to lists, but better. They're like the associative arrays of most programming languages with keys to make values easier to retrieve.","og_url":"https:\/\/vanseodesign.com\/css\/sass-maps\/","og_site_name":"Vanseo Design","article_published_time":"2016-08-23T12:30:21+00:00","og_image":[{"url":"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg","type":"","width":"","height":""}],"author":"Steven Bradley","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Steven Bradley","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#article","isPartOf":{"@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/"},"author":{"name":"Steven Bradley","@id":"https:\/\/vanseodesign.com\/#\/schema\/person\/470cda6ba835fb52596b2e26bcbd8fe4"},"headline":"Building Better Data Structures With Sass Maps","datePublished":"2016-08-23T12:30:21+00:00","mainEntityOfPage":{"@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/"},"wordCount":1346,"commentCount":1,"image":{"@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#primaryimage"},"thumbnailUrl":"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg","keywords":["maps","sass"],"articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vanseodesign.com\/css\/sass-maps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/","url":"https:\/\/vanseodesign.com\/css\/sass-maps\/","name":"Building Better Data Structures With Sass Maps","isPartOf":{"@id":"https:\/\/vanseodesign.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#primaryimage"},"image":{"@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#primaryimage"},"thumbnailUrl":"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg","datePublished":"2016-08-23T12:30:21+00:00","author":{"@id":"https:\/\/vanseodesign.com\/#\/schema\/person\/470cda6ba835fb52596b2e26bcbd8fe4"},"description":"Sass maps are similar to lists, but better. They're like the associative arrays of most programming languages with keys to make values easier to retrieve.","breadcrumb":{"@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vanseodesign.com\/css\/sass-maps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#primaryimage","url":"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg","contentUrl":"http:\/\/vanseodesign.com\/blog\/wp-content\/uploads\/2016\/06\/map-italy.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/vanseodesign.com\/css\/sass-maps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vanseodesign.com\/"},{"@type":"ListItem","position":2,"name":"CSS","item":"https:\/\/vanseodesign.com\/css\/"},{"@type":"ListItem","position":3,"name":"Building Better Data Structures With Sass Maps"}]},{"@type":"WebSite","@id":"https:\/\/vanseodesign.com\/#website","url":"https:\/\/vanseodesign.com\/","name":"Vanseo Design","description":"Helping you build search engine friendly websites","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vanseodesign.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/vanseodesign.com\/#\/schema\/person\/470cda6ba835fb52596b2e26bcbd8fe4","name":"Steven Bradley","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"\/\/www.gravatar.com\/avatar\/0f47bf400c3c1bafe06ee2884405baaa?s=96&#038;r=pg&#038;d=https%3A%2F%2Fvanseodesign.com%2Fblog%2Fwp-content%2Fthemes%2Fvanseo-design%2Fimages%2Fgravatar.png","url":"\/\/www.gravatar.com\/avatar\/0f47bf400c3c1bafe06ee2884405baaa?s=96&#038;r=pg&#038;d=https%3A%2F%2Fvanseodesign.com%2Fblog%2Fwp-content%2Fthemes%2Fvanseo-design%2Fimages%2Fgravatar.png","contentUrl":"\/\/www.gravatar.com\/avatar\/0f47bf400c3c1bafe06ee2884405baaa?s=96&#038;r=pg&#038;d=https%3A%2F%2Fvanseodesign.com%2Fblog%2Fwp-content%2Fthemes%2Fvanseo-design%2Fimages%2Fgravatar.png","caption":"Steven Bradley"},"sameAs":["https:\/\/www.vanseodesign.com\/about\/"],"url":"https:\/\/vanseodesign.com\/author\/vangogh\/"}]}},"_links":{"self":[{"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/posts\/15339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/comments?post=15339"}],"version-history":[{"count":1,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/posts\/15339\/revisions"}],"predecessor-version":[{"id":15341,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/posts\/15339\/revisions\/15341"}],"wp:attachment":[{"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/media?parent=15339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/categories?post=15339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/tags?post=15339"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/vanseodesign.com\/wp-json\/wp\/v2\/series?post=15339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}