3.2. Determining the Subject of a Selector

In the existing proposal, the trailing ! indicator is far superior to a leading syntax, if at least to avoid the "not" connotation and lend more of an "importance" relation.


However, consider the ambiguity of this syntax:

*! > LI:only-child

*! LI:only-child


Which might be resolved by:


Subject Selectors


Parent Selector

For example, the following selector represents a list item LI unique child of an ordered list OL:

OL > LI:only-child

However the following one represents the parent ordered list OL having a unique child, that child being a LI:

OL < LI:only-child

The tree structures represented by these two selectors are the same, but the subjects of the selectors are not.

Ancestor Selector

The following selector represents any ancestor ordered list OL having a LI descendant, that descendant being an only child:

OL << LI:only-child

The last example may be better illustrated with a less semantic example:

DIV << P

Received on Tuesday, 15 December 2015 11:56:35 UTC