Skip to content

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Dec 9, 2014

This PR fixes the treatment of colours when used as map keys.

The current problem is named colours like purple are treated as identifiers meaning they're not evaluated and coerced into colours. This causes issues when doing operations that expect a colour like map-get($map, purple). In this case the argument purple is treated as a colours but the map key purple is a string which causes the lookup to (correctly) fail.

Fixes #652. Specs added sass/sass-spec#156.

This will allow the eval visitor to correctly coerce the string node
to a color node.
@xzyfer xzyfer force-pushed the fix/map-keys-as-colors branch from 55efc28 to dbb7d4a Compare December 9, 2014 12:05
xzyfer added a commit that referenced this pull request Dec 9, 2014
@xzyfer xzyfer merged commit 8ba2e36 into sass:master Dec 9, 2014
@xzyfer xzyfer modified the milestone: 3.0.3 Dec 9, 2014
@xzyfer xzyfer modified the milestones: 3.0.3, 3.1 Dec 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Named colours don't work as map keys
1 participant