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

在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

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

报告相同问题?

悬赏问题

  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度