-
Couldn't load subscription status.
- Fork 472
Implement emitting utf8 charset when seen in output #717
Conversation
|
I was myself just encountering an issue where Shall I open another issue? |
|
What do you mean by "explicitly asked for it."? |
|
Test: @charset "UTF-8";
test {
content: "øáéíóúüñ¿éàŤDžǂɊɱʭʬѪ҈ݓ";
}Expected: @charset "UTF-8";
test {
content: "øáéíóúüñ¿éàŤDžǂɊɱʭʬѪ҈ݓ"; }Result: test {
content: "øáéíóúüñ¿éàŤDžǂɊɱʭʬѪ҈ݓ"; } |
|
FYI as of Sass 3.4.
|
|
👍 Thanks for the info! So I guess this implementation is on par with ruby sass! If we see a char above 127 we will output the utf-8 charset declaration, simple as that! |
|
There's more detailed information here - https://github.com/sass/sass/blob/28ce632750571de900a4471c4c97d268d1f847a2/doc-src/SASS_REFERENCE.md#encodings |
|
Tres simple! On Thu, Dec 11, 2014 at 3:32 PM, Marcel Greter [email protected]
|
|
Unfortunately the link @xzyfer posted makes this related to #381 🙊 |
|
OK, how do we proceed here? IMO we could ship this as-is with 3.0.3. To use less copy & paste we will need to create a common class for each output style. I already did that, but I think this needs a lot more work and fits perfectly into the source_map task, which I also have started some time ago. So I would propose to ship this as-is and open two new issues:
The second issue will be a pretty big task, since I think we should unfiy all the source mapping code into this class, so the actual implementation only passes "stuff" the be in the output to it. It basically should handle the buffer and create the source map automatically. The only downside with the current code is that it repeats the same code block 5 times and that the feature is not optional (does ruby sass have a switch for that?). But it will not break working css! I guess I let you decide on this one!? But I don't think I can get this in in time otherwise! |
|
AFAIK Ruby sass offer no options regarding As for the state of the code I'm fine with it. I agree we should create an |
6c8881a to
8bc7861
Compare
|
Just fixed a bug I haven't seen. Charset should be the very first thing in the css, so it should be after regular css imports. Therefore I had to move the place where the charset is added to the |
|
LGTM |
8bc7861 to
dd2c068
Compare
Implement emitting utf8 charset when seen in output
#629: "when we run into utf-8 characters, we throw in the charset"
There are some unknowns and open things here:
IMO this should be configurable via a context option-> optionalCode needs some re-factoring (use less copy paste)-> todo Unify common code for different output styles #734