W3C home > Mailing lists > Public > www-style@w3.org > July 2009

Re: [css3-selectors] No way to select preceding sibling element

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 13 Jul 2009 18:59:34 -0500
Message-ID: <dd0fbad0907131659p4fb8bc85t9a0a0e6cfbceee43@mail.gmail.com>
To: Paul <paul@scriptfusion.com>
Cc: www-style@w3.org
As an addendum to my previous email, I'll note that we have some
selectors in CSS that are just as bad as some of the reverse
combinators.  :last-of-type, for example, is essentially equivalent to
a reverse ~ ("p:last-of-type" and "p [reverse~] p" are identical in
effect).

However, these selectors are used very little, so their effect is
minor.  As well, pseudoclasses (especially fairly esoteric ones like
:last-of-type) are mentally segregated from simpler things like
combinators, so it's easier to understand that they might produce bad
results when overused.  Putting in generic reverse combinators,
however, invites them to be used more, which can accidentally slow
page-load to a crawl without the author understanding why.

~TJ
Received on Tuesday, 14 July 2009 00:02:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:19 GMT