dotless/dotless — Issue #144: Scope incorrectly calculated for global variables
Author: wiring
Created: 2012-03-01 20:47:14+00:00
State: open

Trying to use a dynamic grid system with dotless that was set up to be used with less.js and works perfectly, there seems to be an issue with the way dotless handles global variables differing from the way less.js does. Simplistic example for clarity:

```css
@value: 10px;
@var: @value; /* expected: 10px */

.mixin(@value:8px) {
width: @var; /* expected: 8px */
}
```
Width should be 8px as it would be in less.js, but it's still set to 10px in dotless.

Not sure if this should be considered a separate or related issue, but I was looking for alternatives available in dotless and noticed that though the feature for scoping variables was removed from less.js (the `#namespace['attr']` syntax), there's still a feature to include a namespace or class in a new namespace/class/selector definition, and access the variables defined from there, but this doesn't work in dotless either. Ex:

```css
#Utils {
@var: "some value";
}

.class() {
#Utils;
prop: @var;
}
```

This works in less.js, but breaks in dotless. It seems to be considered a function of [mixins](http://lesscss.org/#-mixins).