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

Type discrepancy for quoted colors (strings) #1281

Closed
davidkpiano opened this issue Jun 17, 2015 · 3 comments
Closed

Type discrepancy for quoted colors (strings) #1281

davidkpiano opened this issue Jun 17, 2015 · 3 comments

Comments

@davidkpiano
Copy link

TEST:

$string: "green"; // notice quotes

.test {
  type: type-of($string);
}

EXPECTED: (Ruby Sass)

.test {
  type: string;
}

ACTUAL: (LibSass 3.2.5)

.test {
  type: color;
}

On a similar note, type-of(unquote("green")) should also be a string.

@mgreter
Copy link
Contributor

mgreter commented Jun 18, 2015

This is actually easy to fix. We actually have a specific code part for exactly that faulty behavior?

in functions.cpp type-of($value)

- if (ctx.names_to_colors.count(str)) {
-   return new (ctx.mem) String_Constant(pstate, "color");
- }

@mgreter
Copy link
Contributor

mgreter commented Jun 23, 2015

Duplicate of #1280

mgreter added a commit to mgreter/libsass that referenced this issue Jun 23, 2015
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Jun 29, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Jun 29, 2015

Specs added sass/sass-spec#412

mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Jun 30, 2015
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Jul 8, 2015
xzyfer pushed a commit to xzyfer/libsass that referenced this issue Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants