开发者

Using @charset "UTF-8" returns an error

开发者 https://www.devze.com 2023-01-08 02:45 出处:网络
I am trying to compile my .less document, and I am gettin开发者_如何转开发g an error when trying to use @charset \"UTF-8\";.

I am trying to compile my .less document, and I am gettin开发者_如何转开发g an error when trying to use @charset "UTF-8";.

I want to be sure my document is encoded correctly because of the way I embed my fonts. src: local('☺'), url(...);

Any ideas?


Update:

This seems to be a big, they say to fix it in the next version:

More Info: https://less.tenderapp.com/discussions/problems/8-charset-error

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.

That comment by the LESS team was published on:

May 05, 2010 @ 05:50 AM

So it should be fixed in recent version. Make sure that you are using the latest version of it.


try

html {
}
@charset "utf-8";
//your style


Try this way:

@charset "UTF-8";

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-size: 15px;
    background-color: #fff;
    color: #6f6f6f;
    font-family: 'Roboto', sans-serif;
    line-height: 24px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消