Re: [selectors4] Features to Defer

On 22/07/2015 10:05, Benjamin Poulain wrote:

> Can you please give some context? I only joined this group last year.
> This is the first time I hear someone taking the subject selector
> seriously.

Sure. The subject selector is something I introduced myself back in 1998
in a CSS-like language called STTS; STTS standing for Simple Tree
Transformation Sheets, I guess you understand easily what it was about.
At that time, the selector was called the "selected element selector"
and its first iteration was a :selected() functional pseudo-class (no
flames please :-) ) specifying, in a selector, the subject of the
selector. I eventually moved from that pseudo to a very easy to
understand ! descriptor and called it the subject selector.
Trivial examples:

  div > p  matches all p directly inside a div
  !div > p matches all div directly containing a p

In terms of implementation, it changes nothing to the "match selectors
from the deepest condition to the upmost one", but it potentially
defers the application of the selector to a subsequent climb in the
tree. I understand it impacts the implementation and requires some
changes. I implemented it in a batch processor handling STTS.

In terms of usage, this was far less powerful than :has(). But it was
also far simpler to use and read, and most certainly easier to
implement. From a Web author's perspective, it covered most of the
cases needed _at that time_. I still think it would be a superb
addition to Selectors, probably highly welcomed by our users.

Is that enough context?

</Daniel>

Received on Wednesday, 22 July 2015 08:51:23 UTC