将 CombresMvc 与 TelerikMvc 结合使用

发布于 2025-01-08 02:54:16 字数 1324 浏览 0 评论 0原文

我正在使用 Combres 组合器/压缩器 NuGet 包。我还使用以下过滤器:

  <filters>
    <!-- This filter allows relative urls to be used in Css files like in .NET; e.g. "~/MyFolder/MyPic.png"-->
    <filter type="Combres.Filters.FixUrlsInCssFilter, Combres" />
    <!-- This filter allows you to define variables in a CSS file and reuse them throughout the file. -->
    <filter type="Combres.Filters.HandleCssVariablesFilter, Combres" />
    <!-- This filter changes Combres order of ops so that common css variables can be defined in a single
         file and used throughout multiple css files, instead of having to define them in each file. -->   
    <filter type="Combres.Filters.DotLessCssCombineFilter, Combres" />
  </filters>

这允许我定义一个 CssVariables.css 文件,并在任何其他 css 文件中使用这些变量(默认情况下,您必须在每个 css 文件中都有变量定义,它使用DotLessCSSFilter)。

使用 DotLessCssCombineFilter 会更改 Combres 中的操作顺序,以便首先组合文件,然后在组合文件输出中替换变量。

一切都运行得非常好,直到我为 Telerik 样式表设置了资源集。

具体来说,这只是 telerik.common.min.css 文件有问题。该问题出现在行上:

  • html .t-dirty{border-color:#f00 Pink Pink #f00;filter:chroma(color=pink)}

有问题的属性是:filter:chroma(color=pink)

删除该属性阻止 Combres.axd 中发生空错误,从而停止所有处理。该属性仅在整个文件中的该行上使用(据我所知,没有其他地方使用)。

如果删除该属性,一切都会正常进行。

享受!!

I am using the Combres combiner/minifier NuGet package. I am also using the following filters:

  <filters>
    <!-- This filter allows relative urls to be used in Css files like in .NET; e.g. "~/MyFolder/MyPic.png"-->
    <filter type="Combres.Filters.FixUrlsInCssFilter, Combres" />
    <!-- This filter allows you to define variables in a CSS file and reuse them throughout the file. -->
    <filter type="Combres.Filters.HandleCssVariablesFilter, Combres" />
    <!-- This filter changes Combres order of ops so that common css variables can be defined in a single
         file and used throughout multiple css files, instead of having to define them in each file. -->   
    <filter type="Combres.Filters.DotLessCssCombineFilter, Combres" />
  </filters>

This allows me to define a single CssVariables.css file, and use those variables in any of the other css files (by default, you would have to have variable definitions in each css file, which uses the DotLessCssFilter).

Using the DotLessCssCombineFilter changes the order of operations in Combres so that files are combined FIRST and then variables replaced in the combined file output.

All works extremely well, until I set up the resource set for the telerik stylesheets.

Specifically, it is just the telerik.common.min.css file with an issue. That issue appears on the line:

  • html .t-dirty{border-color:#f00 pink pink #f00;filter:chroma(color=pink)}

The offending attribute is the: filter:chroma(color=pink)

Removing that attribute stops a null error from occurring in the combres.axd that stops all processing. That attribute is only used on that line in the entire file (and no where else from what I can tell).

All will work well if you remove that attribute.

Enjoy!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瘫痪情歌 2025-01-15 02:54:16

答案就在问题里。我只是想分享这个,这样其他人就不必像我一样逐行检查 telerik css 文件来隔离问题!

:)

享受!

The answer is in the question. I just wanted to share this so no one else had to go through the telerik css file line by line like I did to isolate the issue!

:)

Enjoy!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文