Option to disable @charset include
See original GitHub issueIs there a way to disable the auto-adding of the @charset
? It can’t be present in AMP CSS - we currently use sass to compile our amp css.
We also concatenate on the server (in some rare circumstances) and if the files generated each have a charset, the resulting concatenation has several charsets
inside.
I am currently using gulp-sass
which wraps node-sass
which uses LibSass
. Is there anyway we can expose an option to disable the charset
?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to remove charset=utf-8 in a Content-Type header ...
Manually setting a header value via HttpHeaders , passed to return ResponseEntity . Each time the resulting header is as follows: Content-Type: ...
Read more >HttpClient: How to Remove Charset From Content-Type Header
Solution is simple - we can create StringContent with whatever encoding and then set charset to empty string.
Read more >HttpClient: How to remove charset from ... - Gunnar Peipman
This removes charset definiton from request content type header. My code started work after this change.
Read more >How to remove "charset=UTF-8" from Content-Type - MSDN
You have a couple of options: 1. If Apache prefer a different charset, you could change it by setting the RequestEncoding on your...
Read more >Completely disable all support for a certain CHAR SET in ...
Sessions can negotiate its own character set ( SET names ). That was a problem because, at least for some time, the PHP...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is not, other than manually trimming it yourself after the fact.
We target the official CSS spec when we generate. If a downstream tool doesn’t correctly handle valid CSS, that’s an issue for that tool.
In this case, the concatenation script falls under the definition of a “downstream tool”. In order to correctly concatenate CSS, you must be resilient to the existence of
@charset
declarations.It’s only added when non-ASCII characters exist.
https://sass-lang.com/documentation/cli/dart-sass#no-charset seems to say there’s a
--no-charset
option available.