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

Re: Text selector [was Re: breaking overflow]

From: James Hopkins <james@idreamincode.co.uk>
Date: Mon, 4 Jan 2010 20:00:35 +0000
Cc: Tab Atkins Jr. <jackalmage@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
Message-Id: <2A763494-3B27-40A2-86B8-25333900C1C3@idreamincode.co.uk>
To: Brad Kemper <brad.kemper@gmail.com>
> On Jan 4, 2010, at 10:28 AM, James Hopkins wrote:
>
>> To clarify, you're suggesting that ::text("foobar") would match the  
>> string "foo bar"?
>
> Are you saying that "foo bar" would not normally be a single text  
> node, but rather two adjacent text nodes?

The latter - two adjacent text nodes.

>>> I still don't support
>>> matching across element boundaries, as it will work in a non- 
>>> intuitive
>>> manner.  For example, the following code:
>>>
>>> <p>foo <i>bar</i> baz</p>
>>> p::text("foo b") { display: block; }
>>>
>>> Would result in the following display:
>>>
>>> foo
>>> b
>>> ar baz
>>
>> The pseudo element would be restricted to applying a limited range  
>> of properties, similar to ::first-line or ::first-letter.
>
> I think the need to have a full range of properties is much, much  
> greater than the need to select across element boundaries.

Agreed. As I said in my last email, I think the number of use cases  
for crossing element boundaries are pretty minimal, and are probably  
worth sacrificing for other features. Yes, after seeing Tab's example,  
I think it may prove useful for ::text() to support layout properties  
as well.
Received on Monday, 4 January 2010 20:01:08 GMT

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