LESS compilation error ParseError: Syntax Error on line 1

I am trying to do some customization in my existing bootstrap less file by importing my own smaller file into the existing bootstrap.less.

I thought it would be easy, but I had already spent a couple of minutes on a couple to try to make even less compiled ones.

every time i add my file i got:

ParseError: Syntax Error on line 1 in C: \ xxx \ content \ bootst rap \ less \ xxx.form.less: 9: 999 8}

My own file is smaller:

.form-unit { background-color: #F5F5F5; border-radius: 6px 6px 6px 6px; margin-bottom: 30px; padding: 10px; min-height: 170px; position:relative; } 

Does anyone have the same problems? what did I miss???

I put it online, no wonder it works, I'm so confused on-line compile

+12
css less twitter-bootstrap
May 11 '12 at 13:07
source share
4 answers

Do you use SimpLESS as your LESS compiler? If so, an error appears in which he cannot read files encoded in UTF-8 using the specification. Just convert the file to UTF-8 without specification, and it will work.

+24
May 14 '12 at 11:15
source share

For anyone who uses Visual Studio and continues to tear out hair with a problem above (I have been in the same boat for the last hour or so, and the approved answer above did not work for me) d recommend getting the Web Essentials Extension .

It allows you to instantly compile LESS files into miniature CSS whenever they are saved in much the same way as SimpLESS does. No complaints about coding, line endings or anything else!

+3
Sep 27 '13 at 13:50
source share

For all .less files used in Visual Studio, you need to change the UTF encoding ....

File> Advanced Save Options ...
Set "Encoding" to "Unicode (UTF-8 without signature) - code page 65001

Once you do this, the Simpless compiler will work for your files.

+3
Nov 25 '13 at 18:35
source share

If you are using Visual Studio, make sure that you do not accidentally add the included file to the compilation list. Check compilerconfig.json and make sure that you are not trying to compile the main SASS file and its included.

0
Jun 22 '17 at 13:31 on
source share



All Articles