1

Closed

Dotless nested rules not working

description

When trying to use nested rules in a .less file, they do not get compiled into the main file. I have also tried separating the css from the less but I still run into the same issue. I have tried:

<resourceSet name="siteCss" type="css">
  <resource path="~/content/Site.css" />
</resourceSet>
<resourceSet name="siteLess" type="css">
  <resource path="~/content/Home.less" />
</resourceSet>
and this:

<resourceSet name="siteCss" type="css">
  <resource path="~/content/Site.css" />
  <resource path="~/content/Home.less" />
</resourceSet>
When used by itself, dotless works correctly. Here is the example .less file:

.testClass
{
.innerClass
{
    a
    {
        margin: auto;
    }
}
}
Closed Aug 29, 2012 at 5:56 PM by buunguyen
Not an issue

comments

buunguyen wrote Jun 2, 2012 at 7:12 PM

Hi, make sure you have this declared in Combres.xml
<filter type="Combres.Filters.DotLessCssFilter, Combres" acceptedResourceSets="siteCss" /> where siteCss is the name of the resource set which you want the less filter to run. Alternatively, you can use to DotLessCssCombineFilter which will perform 'less' processing after Combres has combined all the CSS.