Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

$map: ... is not a map for `map-get'

when i try to use a map , i get this error " $map: (("color" #ff0000), ("size" 16px), ("decoration" "uppercase")) is not a map for `map-get' "

what does mean ?

this is my code :

$a:(
  color red,
  size 16px,
  decoration uppercase
);

a {
  color: map-get($a, color);
}

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi bob,

Sass maps require a colon between the key and value, see the below.

$a:(
  color: red,
  size: 16px,
  decoration: uppercase
);

a {
  color: map-get($a, color);
}

i believe its not allow you to use the middle - dash because its concerning as negative so I think try to use underline such as _.

what does the error said?