Skip to content

Add support for "direct descendant" selectors to sel #2

@danielytics

Description

@danielytics

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions