doushi5913 2019-08-05 04:19
浏览 696
已采纳

在VSCode中编辑Go模板时出现错误“属性值预期css”和“规则或选择器预期css”

I'm using Go and package html/template. This is my code in mypage.tmpl:

<div class="col-sm-1">
        <i class='fas fa-square companies-color' style="color: {{.Company.Color}}"></i>
</div>

But I get errors in VSCode:

property value expected css(css-property value expected)

and

at-rule or selector expected css(css-rule selector expected)

when I try {{ }} in style html.

screen shot of VSCode error messages

  • 写回答

1条回答 默认 最新

  • douzhe3516 2019-08-14 13:25
    关注

    I have found solution. Turn off html validate styles in setting's vscode

    vscode disable validate style html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?