【问题标题】:VS BuildBundlerMinifier compile errors in site.min.css Expect comma, found '/'VS BuildBundlerMinifier 在 site.min.css 中编译错误期望逗号,发现 '/'
【发布时间】:2021-05-14 13:28:23
【问题描述】:

我将 Visual Studio 2019 用于 ASP.net Core 解决方案,BuildBundlerMinfier 用于在构建时捆绑 js 和 css 文件。

如果我在 bundleconfig.json 中包含的 css 文件中有类似的内容:

rgb(26 179 232 / 15%)
rgb(60 64 67 / 30%)

当我尝试构建时,site.min.css(捆绑器输出文件)会出现这种编译错误:

Expect comma, found '179'  
Expect comma, found '64'  
Expect comma, found '/'

我目前唯一的解决方案是不要将此捆绑器用于 css。

【问题讨论】:

    标签: css asp.net-core visual-studio-2019 bundler


    【解决方案1】:

    以下是适合您的解决方案:

    rgba(26, 179, 232, 0.15)
    rgba(60, 64, 67, 0.30)
    

    希望我对您有所帮助!

    【讨论】:

    • 所以我应该使用 rgba( ... 0.15 而不是 rgb(... /15%,这将是相同的 css,只是没有 VS 错误?
    • @buga 没错! :)
    猜你喜欢
    • 2014-03-23
    • 1970-01-01
    • 1970-01-01
    • 2021-11-17
    • 1970-01-01
    • 1970-01-01
    • 2011-06-09
    • 1970-01-01
    • 2017-08-22
    相关资源
    最近更新 更多