`$@` (Variable properties) should be documented
Under maps, section named: Using variable variables in lookups references lookups, not maps, so when I tried to apply it, the code looks like this
@foods: {
dessert: ice cream; // Turn into a map
};
@key-to-lookup: dessert;
.lunch {
treat: @foods[@@key-to-lookup];
}
Compilation result: variable @dessert not found. So if variable variables are not applicable to the new Maps, it should be removed from documentation.
@ayyash You have defined dessert as a property, not a variable (there's no such "key" as @dessert, therefore you need the property variable syntax, as follows:
@foods: {
dessert: ice cream; // Turn into a map
};
@key-to-lookup: dessert;
.lunch {
treat: @foods[$@key-to-lookup];
}
Properties are referenced using $ or the plain name, but to look up a variable property, you need $@
Updated the description as I don't think variable properties are currently documented, even though this functionality exists.
See: https://github.com/less/less.js/issues/3362