Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when processing map #1276

Closed
mikeebee opened this issue Jun 15, 2015 · 4 comments
Closed

Error when processing map #1276

mikeebee opened this issue Jun 15, 2015 · 4 comments

Comments

@mikeebee
Copy link

Hi,

I copied code directly from an example and I'm getting an error.

This is the code I'm trying to get working - http://codepen.io/erskine/pen/xEqFC

When I process this through LibSass, I get this error

argument `$map` of `map-get($map, $key)` must be a map

Backtrace:
    sass/[filename].scss:55, in function `map-get`
    sass/[filename].scss:55, in function `_fontset-feature`
    sass/[filename].scss:60, in function `calc-font-size`
    sass/[filename].scss:73, in mixin `font-scale`
    sass/[filename].scss:86
Line 55  Column 22  sass/[filename].scss

The line with the error is from the _fontset-feature function...

$result: map-get(map-get($family, $set), $feature);

Any ideas?
Thanks!

@KittyGiraudel
Copy link

A wild guess would be that map-get($family, $set) returns no result, so null, which is not a map for map-get(null, $feature).

Anyway, I just tried this code on SassMeister and there is no bug whatsoever. I'm pretty sure it's due to a configuration issue with a non-existant map / key. I think you can close.

If I may ask, why would you even think there is a bug with LibSass rather than the code you copy/pasted?

@mikeebee
Copy link
Author

Couple of reasons:

  1. I had similar errors when trying something like this before, and it was a bug in LibSass.
  2. Since it was functioning on Codepen, using Sass, I assumed it would work if copied into my environment.

Sound ok?

@KittyGiraudel
Copy link

I think the first issue is related to map keys being colors instead of strings, so it might be a different problem.

Regarding environment, CodePen is running on Ruby Sass, but you try LibSass on SassMeister. I did with your code and had no bug. :)

@mikeebee
Copy link
Author

Ah, must be an issue with my setup as I copied the code directly.

Thanks for your input!

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

No branches or pull requests

2 participants