madskristensen / WebEssentials2013

Visual Studio extension
http://vswebessentials.com
Other
945 stars 252 forks source link

Minifying LESS files with escaped characters results in  #1919

Open stinaq opened 9 years ago

stinaq commented 9 years ago

When trying to minify a .LESS file that contains an escaped character, I get only 

For example, my LESS looks like this:

.fa-glass:before {
    content: "\f000";
 }

And the generated CSS file looks the same. But the generated .min.css file has this content:

.fa-glass:before{content:""}

I have managed to reproduce this error on two different computers. This occurs in Visual Studio Premium 2013, Update 4, and Web essentials for update 4

am11 commented 9 years ago

@stinaq, will investigate this issue. Incidentally, you may want to upgrade to VS 2013 Update 5, which is released recently:

https://www.visualstudio.com/downloads/download-visual-studio-vs#d-premium.

(note that if you select Web Installer, it downloads file called vs_preminum with no .exe extension, so you would need to download the file, rename and add .exe extension manually before running the setup. guess it is a major deployment bug in all flavours of VS2013 Update 5.. :stuck_out_tongue_winking_eye:)

The exact version of the installed Web Essentials can be found from: Visual Studio > Help > Web Essentials. The latest version of WE is v2.6.12 (soon to be released v2.6.13 => https://github.com/madskristensen/WebEssentials2013/issues/1914#issuecomment-123012169)

stinaq commented 9 years ago

After further investigation this seems like an issue that's been reported before, in #813 among others. And it's supposed to work, however I had trouble, was just getting tiny squares in the browser. But when I added @charset "UTF-8"; to the top of the less file, it started working. So I'm sticking with that for now. Guessing this issue could be closed.