Optional child selector, with CSS/Stylus/LESS: .aa > .bb? > .cc
if you want use your option, by the way is very interesting, you can use a form most correct:
>.aa (>.bb)? >.cc { ... }
but the form correct would:
.aa .cc { ... }
into stylus:
.aa
.cc
thats all.
Wouldn't .aa > .cc, .aa > .bb > .cc {}
work? Or did I misunderstand your question?
This selects only the .cc
that are direct .aa
children and the .cc
that are .bb
children (children of .aa
) as well.
For Stylus and Sass you could do this (live example for Sass):
.aa
> .bb, &
> .cc
width: 10px
I couldn't find a way to do so in a one-liner for Sass, but for Less/Stylus/Scss you could do also this (live examples for Scss, for Less) :
.aa { > .bb, & { > .cc {
width: 10px
}}}
This is not that pretty also, but still better than nothing :)