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

A space following a CSS escape sequence should be ignored #1419

Closed
andrew-skybound opened this issue Jul 29, 2015 · 3 comments
Closed

A space following a CSS escape sequence should be ignored #1419

andrew-skybound opened this issue Jul 29, 2015 · 3 comments

Comments

@andrew-skybound
Copy link

p {
  color: to-upper-case("ab\63 d");
}

Ruby sass

p {
  color: "ABCD";
}

Libsass

p {
  color: "ABC D";
}

The Ruby implementation follows the CSS specification, which allows a single space after an escape code to be ignored so that if the following character is a hexadecimal character, it will not affect the escaping.

Escaping is also handled incorrectly for unquoted strings.

p {
  color: to-upper-case(ab\63 d);
}

Ruby sass

p {
  color: ABCD;
}

Libsass

/* argument `$string` of `to-upper-case($string)` must be a string */

In this case, it appears that Libsass is parsing ab\63 d as a list of two strings, instead of a single unquoted string.

xzyfer added a commit to xzyfer/sass-spec that referenced this issue Aug 4, 2015
@xzyfer xzyfer added this to the 3.4 milestone Aug 4, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Aug 4, 2015

Spec added sass/sass-spec#464

@mgreter
Copy link
Contributor

mgreter commented Aug 17, 2015

From https://drafts.csswg.org/css-syntax-3/

Consume as many hex digits as possible, but no more than 5. Note that this means 1-6 hex digits have been consumed in total. If the next input code point is whitespace, consume it as well.

@mgreter mgreter modified the milestones: 3.3, 3.4 Aug 23, 2015
@mgreter mgreter self-assigned this Aug 23, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Aug 24, 2015

Fixed in 3.3

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