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

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>
   http://www.geocities.com/WestHollywood/5876/

Received on Thursday, 4 December 1997 13:54:56 UTC