Re: Select elements based on text content

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

Yes.

> 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...

-Boris

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