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

Hash tokens containing dashes are incorrectly evaluated as colors #1404

Closed
andrew-skybound opened this issue Jul 27, 2015 · 1 comment
Closed

Comments

@andrew-skybound
Copy link

A hex color code immediately followed by a sequence of one or more dashes followed by a digit is evaluated as an addition or subtraction expression (depending upon the number of dashes). When a color code is followed by one or more dashes and an alpha character, however, the trail is appended to the end of the color code and the entire expression becomes a string. This is different from Ruby SASS, which always recognizes the entire sequence as an unquoted string.

Input:

.test {
    color: #aaabbb--1-2-a;
    color: type-of(#aaabbb--1-2-a);
    color: type-of(#aaabbb--1-2);
}

Ruby SASS:

.test {
  color: #aaabbb--1-2-a;
  color: string;
  color: string;
}

Libsass:

.test {
  color: #a9aaba-a;
  color: string;
  color: color;
}
@xzyfer
Copy link
Contributor

xzyfer commented Jul 28, 2015

@andrew-skybound thanks for the report. I can confirm this issue exists on the latest master.

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