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

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.

Received on Tuesday, 14 July 2009 00:02:14 UTC

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