AXR/Specification — Issue #12: additional hierarchical notation
Author: Mouvedia
Created: 2011-11-28 19:14:35+00:00
State: open
Labels: under discussion

http://axr.vg/spec/chapter/9
http://axr.vg/spec/chapter/14

The spec (1.3.2 Hierarchy) currently says:

>Rules can be nested inside another rules which will only match **descendants** of the elements matched by that other selector used by the set. (emphasis mine)

But after verification it turns out that only *children* were meant to be matched:

note
{
subject { }
}

//equivalent to
note subject { }

What I am asking here is to add the possibility to do it for descendants too:

note ..
{
subject { }
}

//equivalent to
note .. subject { }

It has a lot of usage for example enclosing big chunk of code when you want to change their scope at once. If you change your mind later you just just remove 3 lines and you are good to go. [Laziness is a virtue](http://en.wikipedia.org/wiki/Larry_Wall#Virtues_of_a_programmer) in programming.
In the case of someone converting a hierarchical child rule into a hierarchical descendant rule, the properties inside would match the element and ignore the `..` combinator:

note ..
{
background:red; // would match the note element
subject { }
}