grunt build css encoding

253 views Asked by At

Static project using yeoman -webapp

I have a UTF checkmark within my .scss files:

[type="checkbox"]:checked + label:after {
  content: '✔';
  position: absolute;
  top: 3px; left: 0px;
  font-size: 22px;
  color:$color-primary;
  transition: all .2s;
}

In my compiled .css, the content has been butchered:

@charset "UTF-8";

div.checkbox [type="checkbox"]:checked + label:after {
  content: 'Ô£ö';
  position: absolute;
  top: 3px;
  left: 0px;
  font-size: 22px;
  color: #76C001;
  transition: all .2s; }

Gruntfile.js gist

Would love if someone could enlighten me on the why's and/or fixes. Please.

2

There are 2 answers

2
lharby On BEST ANSWER

How is this?

http://jsfiddle.net/lharby/h3ky89wa/

p:before {
   content: '\2714';
}
1
Johannes Reuter On

I didn't try it, but try the utf8-character in hex-notation:

\u2714