错误“属性值预期 css"和“规则或选择器预期的 css"在 VSCode 中编辑 Go 模板 [英] Error "property value expected css" and "at-rule or selector expected css" editing Go template in VSCode

查看:135
本文介绍了错误“属性值预期 css"和“规则或选择器预期的 css"在 VSCode 中编辑 Go 模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Go 并打包 html/template.这是我在 mypage.tmpl 中的代码:

<i class='fas fa-square Companies-color' style="color: {{.Company.Color}}"></i>

但我在 VSCode 中遇到错误:

<块引用>

property value expected css(css-property value expected)

<块引用>

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

当我在 html 样式中尝试 {{ }} 时.

解决方案

我找到了解决方案.在设置的 vscode 中关闭 html 验证样式

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.

解决方案

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

这篇关于错误“属性值预期 css"和“规则或选择器预期的 css"在 VSCode 中编辑 Go 模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆