question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a flag to emit ASCII-only output

See original GitHub issue

I’m working with Sass 3.4.

My sass source code is:

#test
  content:  "\f000"

when parsed it got converted to:

#test {
  content: "";
}

I’m using expanded style and sass syntax. I’ve noticed that switching to scss works correctly, anyway my entire codebase is in sass format 😦

Is there any way to preserve original content unicode string?

Thanks in advance

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:21
  • Comments:102 (28 by maintainers)

github_iconTop GitHub Comments

24reactions
stephnrcommented, Oct 1, 2014

I was able to create a backwards solution for generating the proper output for the font content declarations

@mixin icon($name, $content) {
  .icon-#{$name}:before {
    content: unquote("\"")+unquote(str-insert($content,"\\", 1))+unquote("\"");
  }
}

// Example
@include icon("Alert","e655");

And then the generated CSS:

.icon-Alert:before { content: "\e655"; }

This works for the current 3.4.x gem of Sass

18reactions
Perkoveccommented, Apr 19, 2016

Alternatively you can use gulp-sass-unicode ( for gulp of course )

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASCII" option flag with the SAVE function add extra end-of-line ...
When I create or load data into MATLAB and then write it out to a file using the SAVE function with the -ascii...
Read more >
ASCII Conversion Chart
This is my reconstruction of a chart that I used while teaching microprocessor programming. It is derived from a chart that I believe...
Read more >
3.7 Options to Control Diagnostic Messages Formatting
Only meaningful in line-wrapping mode. Instructs the diagnostic messages reporter to emit the same source location information (as prefix) for physical lines ...
Read more >
Dart Sass Command-Line Interface
If no output location is passed, the compiled CSS is printed to the terminal. ... This flag tells Sass only to emit ASCII...
Read more >
Change output format for MySQL command line results to CSV
I can get rid of the header with mysql <stuff> | tail -n +2 , but that's a bother I'd like to avoid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found