Re: Text selector [was Re: breaking overflow]

On Jan 4, 2010, at 2:20 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 1/4/10 5:07 PM, Brad Kemper wrote:
>> Let's say you have some text that cruises the boundary of a first- 
>> line
>> pseudo-element. Why should the ::text pseudo-element be more  
>> restricted
>> than an actual element, such as a SPAN or a B?
>
> The latter is not able to cross the boundary of a :first-line pseudo- 
> element without actually being an inline.  Thus the styling on  
> elements which can cross the boundary of first-line is non-arbitrary.

My point is that it can be treated the same way as a full-fledged  
element. We don't need to say "any display or float properties you set  
on ::text will always be ignored", since we don't say that for other  
elements that could possible appear in the same places. We should be  
able to treat a ::text() pseudo-element the same as other elements in  
general WRT acceptable CSS.

> I suppose one could do ::text processing before dealing with first- 
> line and first-letter, and that might make things similar enough...

Sure. That should work, it seems to me (of course, I'm not the one  
that would be writing the UA code, or making it work with existing  
code, so it's easy for me to say). 

Received on Monday, 4 January 2010 23:27:15 UTC