2013-01-11 27 views
4

我使用無點的CSS。 這是我的代碼無dotss參考不工作在發佈模式(與Combress)

.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; 
} 

當我是我自己的機器上,在調試模式下,所有的CSS文件(也是這個main.less文件)分別引用。

在這種情況下,jqmWindowBig類是jqmWindowBigjqmWindowCommon的組合,並且一切正常。

現在在製作時,壓縮會創建一個包含我所有CSS文件的大文件,然後CSS將文本輸入到.LESS文件中,因此.jqmWindowCommon部分不會被'jqmWindowCommon'部分替換所以jqmWindowBig是不完整的。

這是我combress配置:

<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> 
總之

所以:參考.jqmWindowCommon;不更換,發行模式下運行時。

編輯 它不只是這其中不工作,我可以看到的是,這些類型的規則

width: @planningEventItemWidth; 

不工作要麼,所以basicly沒有.LESS功能工作時用Combress>

合併
+0

你在使用@import「stylesheetname.css」;在.less文件中? –

+0

沒有,在.less文件中沒有導入 – Michel

回答

1

你combres配置缺少過濾器LESS:

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

我給了你答案的賞金點,我會明天檢查它的工作原理。 – Michel

0

如果直接把你的鏈接資源,你會發現它可能^ h作爲錯誤。我不認爲你可以在同一個resourceSet中添加css和更少的文件。

更新 * 證實,過濾器每的ResourceSet: * https://github.com/buunguyen/combres/issues/5#issuecomment-12915712

你可以得到它通過使用帶點過濾器和您的較少文件移動到這樣一個單獨的ResourceSet工作:

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

希望有所幫助。

相關問題