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

Re: Selector Readabiliitiy [WAS: Backwards compatibility of new selectors]

From: Susan Pinochet <pinochet@polaris.net>
Date: Thu, 4 Dec 1997 13:18:40 -0500
Message-Id: <l03010d00b0aca2f9e9d1@[]>
To: "www-style@w3.org" <www-style@w3.org>
At 10.55 am -0500 1997.12.04, Andrew n marshall wrote:
>CSS-2 (I think):
>	DIV.sect //P/ {...}
>	DIV.sect /P// {...} /* not official syntax, but suggested in a
>comment at
>the end of 6.6 */
>Mine (tweaked from Douglas Rand's original proposal):
>	DIV.sect P:first-child {...}
>	DIV.sect P:last-child {...}
>I think the second example is considerably more readable (and therefore
>writable).  I would also like to see a similar 'first-of-type' (needs a
>better name) to cover the 'P' in the following case:
>	<DIV class="sect">
>	   <H2>Title for section</H2>
>	   <P>Choose this paragraph</P>
>	   <P>Not this one</P>
>	</DIV>
>This idea does present the problem of how to specify the first-letter or
>first-line of the first-child (such as a drop-cap). The obvious solution
>screams for multiple pseudo-classes and pseudo-elements per selector.

Yes. Yes. Yes. The second example is much more readable and writeable. It
certainly is more in line with existing CSS1 syntax. Most of us who will be
writing stylesheets will not want to do machine parsing in our heads. It
would also be great if the language remains simple enough to write without
having to resort to wysiwyg-ish editors because the language is too
difficult otherwise.

-- Susan Pinochet <pinochet@polaris.net>
Received on Thursday, 4 December 1997 13:54:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:45 UTC