开发者

Is it possible to have several CSS files reuse the same variables with Combres and Dotlesscss?

I've used Combres for a while and really like it. And now I've started to use Dotlesscss filter as well to enable variables and more readable code that can hopefully stay clean and readable...

One nice advantage with Combres is that splitting large CSS files into several files with different responsibilities is really nice.

My problem is combining this to take advantage of both Combress and Dotlesscss.

I would like to have a variables.css file with all basic variables I need to set colors, etc. on the my site, but the way Combres combines, filters and compress the CSS files seems to be in this order:

filter -> combine -> compress

which of course means that separate CSS files have no idea what variables are defined in other CSS files, so if I want one color everywhere, I would have to add a variable for it in all CSS files.

It wo开发者_如何学Culd be nice if it was possible to change the order to:

combine -> filter -> compress

That way I could have a variables.css with all variables in one files and the usage of them spread across multiple files. This would mean that if I wanted to change styling, I would only need to mess around in the variable definition file.

Is it possible to change the order Combres does these things?


I'm the author of Combres. It is possible to apply the filter after combination step. All you have to do is implement the interface ICombinedContentFilter and put necessary filtering logic. Combres has built-in filters supporting both single file dotless application (DotLessCssFilter) and combined dotless application (DotLessCssCombineFilter). Just register DotLessCssCombineFilter for your resource set and that should be it.

Is it possible to have several CSS files reuse the same variables with Combres and Dotlesscss?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜