In CSS, .foo .bar means any element with class bar contained anywhere within any element with class bar, that itself can be anywhere in the document and .foo > .bar means any element with class bar that is a direct child of any element with class foo, that itself can be anywhere in the document.
That is, given:
[:div.a
[:div
[:div.b "X"]]
[:div.b "Y"]]
.a .b would match [:div.b "X"] and [:div.b "Y"]
.a > .b would only match [:div.b "Y"]
Currently, sel only supports .foo .bar and not .foo > .bar. Support for direct-descendant selectors should be added.
Support can be manually obtained through the use of view, sel-* and the predicate functions, but support should be added to sel for convenience.
In CSS,
.foo .barmeans any element with classbarcontained anywhere within any element with classbar, that itself can be anywhere in the document and.foo > .barmeans any element with classbarthat is a direct child of any element with classfoo, that itself can be anywhere in the document.That is, given:
.a .bwould match[:div.b "X"]and[:div.b "Y"].a > .bwould only match[:div.b "Y"]Currently,
selonly supports.foo .barand not.foo > .bar. Support for direct-descendant selectors should be added.Support can be manually obtained through the use of
view,sel-*and the predicate functions, but support should be added toselfor convenience.