Re: Text selector [was Re: breaking overflow]

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