Charset error
The compiler throws an error when compiling LESS documents that have character encoding set using @charset.
The character coding I am using is:
@charset "utf-8";
When I compile I get the following error, but if I remove the above line, the error goes away.
! Syntax Error: on line 1: expected : got " after: @charset
I am assuming that the compiler believes @charset to be a variable declaration. Some IDEs such as Dreamweaver and Aptana insert the above character encoding in new CSS files by default. Thanks.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by cloudhead on 05 May, 2010 12:50 AM
Thanks for posting, this is fixed in the upcoming 2.0 version, which should be released sometime this month. It is indeed due to
@charset
not being parsed as a directive.2 Posted by Rhett Hutchens on 05 May, 2010 03:15 PM
Great. Thanks for all the hard work you've put in and for sharing your project with the community. It's very cool.
3 Posted by Stephen on 20 Jan, 2011 11:45 PM
Seems this is still a problem. ~9 months without a fix?
Support Staff 4 Posted by cloudhead on 20 Jan, 2011 11:48 PM
This has been working fine in the current LESS.js build for a while now. I don't plan on back-porting to ruby.
5 Posted by Stephen on 20 Jan, 2011 11:54 PM
All of the documentation on less.org points to using the Ruby compiler - I guess I should google to find out about the .js version as I am getting syntax errors everywhere.
Support Staff 6 Posted by cloudhead on 20 Jan, 2011 11:56 PM
Yea the site update is long due, my apologies.
https://github.com/cloudhead/less.js
http://incident57.com/less/
7 Posted by Stephen on 21 Jan, 2011 12:02 AM
No apologies needed, thanks for the links!