W3C home > Mailing lists > Public > www-style@w3.org > February 2004

[css3] Proposal: Syntax modification (structural pseudo classes)

From: Jens Meiert <jens.meiert@erde3.com>
Date: Thu, 5 Feb 2004 11:36:11 +0100 (MET)
To: "W3C CSS" <www-style@w3.org>
Message-ID: <10681.1075977371@www51.gmx.net>

What about a simplification of some structural pseudo classes (like e.g.
'E:nth-child(n)' or 'E:nth-last-child(n)') by switching to a syntax like


where 'n' represents the usual syntax? -- Thus, there are several analogies,
e.g. 'E(2n+1)' complies with 'E:nth-child(2n+1)', but there must be negative
values when referring to e.g. 'E:nth-last-child(2)', what becomes 'E(-2)'.
Additionally, 'E(0)' would be equal to 'E', similarly to the intended '0'
value interpretation of the 'colspan' (and 'rowspan') attribute in HTML [1].

Maybe the syntax could even be extended by adding 'level' dependency
(related to the DOM), by offering a selector like


where 'm' indicates the layer counted from the root element (I'll leave this
abstract for now). -- That's only a rough concept, but I thought it might be
easier to use as well as more compact than the current solution (I apologize
if there already were such suggestions).

Best regards,

[1] http://www.w3.org/TR/REC-html40/struct/tables.html#adef-colspan

Jens Meiert
Interface Architect

Received on Thursday, 5 February 2004 05:36:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:11 UTC