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

Char escaping doesn't follow Sass 3.3 or 3.4 ways #1271

Closed
kaelig opened this issue Jun 11, 2015 · 6 comments · Fixed by Financial-Times/o-ft-icons#69
Closed

Char escaping doesn't follow Sass 3.3 or 3.4 ways #1271

kaelig opened this issue Jun 11, 2015 · 6 comments · Fixed by Financial-Times/o-ft-icons#69

Comments

@kaelig
Copy link
Contributor

kaelig commented Jun 11, 2015

See http://sassmeister.com/gist/cd6d8d263d555bca6cf9

Neither of these things return the correct value in LibSass:

$character-code: f102;

test {

  /* Expected: "\f102" */

  /* Sass 3.4 */
  content: unquote("\"\\#{$character-code}\"");

  /* Sass 3.3 */
  content: str-slice("\x", 1, 1) + $character-code;

}
@kaelig kaelig changed the title Char escaping doesn't follows neither Sass 3.3 or 3.4 ways Char escaping doesn't follow Sass 3.3 or 3.4 ways Jun 11, 2015
@kaelig
Copy link
Contributor Author

kaelig commented Jun 11, 2015

If a workaround exists I'd be interested to know about it.

@KittyGiraudel
Copy link

On top:

$value: str-slice(unquote('\\'), 1);

/ in Ruby Sass, // in LibSass.

@kaelig: This should do the trick on LibSass (related #1231):

.foo {
  content: #{'\"\\' + $character-code + "\""};
}

@kaelig
Copy link
Contributor Author

kaelig commented Jun 12, 2015

Thanks, although LibSass renders the actual unicode char (content: ;). Is that what is supposed to happen? Does it work everywhere?

@KittyGiraudel
Copy link

Reported in #1231.

@mgreter mgreter added this to the 3.4 milestone Jun 13, 2015
@JLHwung
Copy link

JLHwung commented Aug 31, 2015

Another situation might be relevant to this issue, see http://sassmeister.com/gist/6b58d3d5b01bb2a932c6

This snippet is from bootstrap-sass-official and it breaks the apperance of breadcrumb component.

@xzyfer
Copy link
Contributor

xzyfer commented Sep 6, 2015

Fixed via #1534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants