-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
@charset stripped in :compressed output #1449
Comments
It could be that UTF-8 is the default charset and does not need to be declared. |
@Stephn-R I did some research and it needs to be declared if you use non-english characters in your CSS and your HTML is encoded differently. Here's a link about charsets if it helps anyone. |
In compressed mode, Sass adds a UTF-8 byte-order mark rather than an explicit |
Thanks for clearing this up, @nex3! 👍 |
But it causes all kinds of trouble when you later try to inline styles, for example when compiling html for email. BOM gets inserted in the middle of resulting email. Some clients ignore it, but Apple Mail shows weird question marks. |
I don't see |
@ronilaukkarinen It should be present in expanded output as long as you have a non-ASCII character anywhere in your stylesheet output. If it's not there, some other tool is probably stripping it out. |
Yesterday I updated a project from 3.3 to 3.4 (specifically, 3.4.5), and it seems that
@charset "utf-8";
is being stripped from files compiled using:compressed
style. I do not believe this is the intended result.Input
Output (default)
sass input.scss output.css
Output (compressed)
sass --style=compressed input.scss output.css
The text was updated successfully, but these errors were encountered: