Dotless css link not working in release mode (with Combress)

I am using unless css. This is my code.

.jqmWindowBig { width: 800px; height: 500px; margin-left: -400px; margin-top: -250px; .jqmWindowCommon; } .jqmWindowCommon { background-color: #EEE; color: #333; border: 1px solid black; display: none; position: absolute; left: 50%; top: 50%; padding: 12px; overflow: auto; } 

When I'm on my machine, in debug mode, all css files (also this main.less file) are referenced separately.

In this case, the jqmWindowBig class is a combination of jqmWindowBig and jqmWindowCommon , and everything works fine.

Now in production, combress creates one large file of all my CSS files, and then the CSS contains the literal code when I entered it in the .LESS file, so the .jqmWindowCommon section .jqmWindowCommon not replaced with 'jqmWindowCommon' so that jqmWindowBig incomplete.

This is my combress config:

 <resourceSets url="~/combres.axd" defaultDuration="30" defaultVersion="auto" defaultDebugEnabled="auto" defaultIgnorePipelineWhenDebug="true" localChangeMonitorInterval="30" remoteChangeMonitorInterval="60" > <resourceSet name="siteCss" type="css" > <resource path="~/Content/StyleSheet/start.css" /> <resource path="~/Content/StyleSheet/Site.css" /> <resource path="~/Content/StyleSheet/reset.css" /> <resource path="~/Content/StyleSheet/screen.css" /> <resource path="~/Content/StyleSheet/razortemplates.css" /> <resource path="~/Content/StyleSheet/logonsmall.css" /> <resource path="~/Content/StyleSheet/ui-lightness/jquery-ui-1.8.23.custom.css" /> <resource path="~/Content/StyleSheet/MainLess.LESS" /> </resourceSet> 

In short: link .jqmWindowCommon; not replaced when starting in release mode.

CHANGE is not only something that does not work, I see that such rules

 width: @planningEventItemWidth; 

also do not work, so the basic .LESS functionality works in conjunction with Combress>

+4
source share
2 answers

Your combres configuration does not have a filter for LESS:

 <filters> <filter type="Combres.Filters.DotLessCssFilter, Combres" /> </filters> 
+1
source

If you connect your linked resource directly, you will notice that it probably has an error. I do not think that you can add css and fewer files to the same resource.

Update * Confirmed filters for ResourceSet: * https://github.com/buunguyen/combres/issues/5#issuecomment-12915712

You can make it work using an aimless filter and moving fewer files to a separate resource, for example:

 <filters> <filter type="Combres.Filters.DotLessCssCombineFilter, Combres" acceptedResourceSets="siteLess"/> </filters> <resourceSet name="siteLess" type="css"> <resource path="~/Content/StyleSheet/MainLess.LESS" /> </resourceSet> 

Hope this helps.

0
source

All Articles