W3C home > Mailing lists > Public > www-style@w3.org > December 2015

3.2. Determining the Subject of a Selector

From: J C <devscript@hotmail.com>
Date: Thu, 10 Dec 2015 13:31:41 +0000
Message-ID: <CY1PR13MB0202AFA417889D4A845E2403B7E80@CY1PR13MB0202.namprd13.prod.outlook.com>
To: www-style@w3.org, www-style@w3.org
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC