duncansmart/less.js-windows — Issue #5: Using the '&'-operator after a subselector doesn't work as expected
Author: marklagendijk
Created: 2011-11-11 08:20:08+00:00
State: open

Using the ‘&’ operator after a selector doesn’t work properly. In the output the ‘&’ parts get places before the subselector instead of after it:

#main {
#content {
.class {
position: absolute;
#container & {
position: relative;
}
}
}
}

Should output:
#main #content .class { position: absolute; }
#container #main #content .class { position:relative; }

But this is what it does output:
#main #content .class #container { position: relative; }

Note: this usage of the ‘&’-operator isn’t documented. In the documentation it only shows the operator being used before a selector. However, it does work when trying this example in the browswer.