AXR/Specification — Issue #17: shared non-inherited properties
Author: Mouvedia
Created: 2011-12-10 00:16:26+00:00
State: open
Labels: under discussion

`&` prefixed before a property is a shorthand of `&(@parent) property`.
The functional notation `&(selector)` lets you access any elements in the tree using the `@root` object or descendants directly from the current scope. If the elements matched by `&(selector)` aren't ancestors of the current element the fact that the property can be inherited or not becomes irrelevant.

element {
background:green;
child {
¬Inherited: valueX;
background: red;
}
}

equivalent to

element {
background:green;
child {
&(@parent) notInherited: valueX;
background: red;
}
}

equivalent to

element {background:green;notInherited: valueX}
element child {background:red;notInherited: valueX}

### Another example:

element {
background:green;
child {
&(childOfChild) notInherited: valueX;
background: red;
}
}

equivalent to

element {background:green}
element child {background:red;notInherited: valueX}
element child childOfChild {notInherited: valueX}