Maps
Maps in Sass are like associative arrays in PHP, dictionaries in Python, and hashes in Ruby. If you're familiar with any of these data types, then you'll understand what a map in Sass is.
Essentially, a map is a set of unordered key/value (or name/value) pairs. The key is a string that holds a value that can be any data type; a string, integer, Boolean, list, or even another map.
Maps look a lot like nested lists in Sass, however they use a descriptive name which actually holds the value. The value is (usually) the part we're really interested in, however the descriptive keys allow you to explain what that value is, or what its purpose is.
Take the following list, which we may have used for our media mixin previously (if we didn't have maps):
$breakpoints: ( (small 480px), (medium 768px), (large 980px) );
What we're doing here is technically abusing a list. Here, we're using the first index of each nested list (small
, medium
, large...