W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: Select elements based on text content

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 29 Mar 2010 22:27:53 -0400
Message-ID: <4BB161A9.7070104@mit.edu>
To: David Chambers <david.chambers.05@gmail.com>
CC: www-style@w3.org
On 3/29/10 9:23 PM, David Chambers wrote:
> My next question is whether browsers could apply discretion as to which
> of a document's elements need to have their text content evaluated?

Yes, but even that can be expensive.

> In this case, am I right in thinking that a document whose CSS contained no
> text content selectors would be rendered as normal


> and that a document
> whose CSS contained text content selectors on td elements only would
> render /other/ elements as per usual?

No, since a selector like "td:contains('something') > span" would affect 
other elements.

> Obviously if such a selector were to be introduced, its use in
> conjunction with the wildcard would need to be discouraged.

I'm not sure that wildcards really make it that much worse, actually...

Received on Tuesday, 30 March 2010 02:28:27 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:44 UTC