sass: Problem with output "@charset 'utf-8';" to CSS

Example:

main.scss:

@charset 'utf-8';

body {
    color: #333;
}

compile to:

body {color:#333}

where is string “@charset ‘utf-8’;” ?

My setup: MacOSX 10.9.3 / Ruby 2.1.2 (Rbenv) / SASS 3.3.7.

Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 15 (3 by maintainers)

Commits related to this issue

Most upvoted comments

looks like its not a problem, example: http://sassmeister.com/gist/9537678

if any html-character present in any *.scss file, even like comment, SASS automaticly adding ‘@charset “UTF-8”;’ in compiled .css file.

Sass will only include a @charset declaration in the CSS output if there are any non-ASCII characters. CSS is parsed as ASCII by default, so it’s unnecessary if the stylesheet is pure ASCII.