Re: Text selector [was Re: breaking overflow]

On Jan 3, 2010, at 1:14 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 1/3/10 3:30 PM, Brad Kemper wrote:
>>> That's also what I would expect - that it essentially cascades on
>>> individual characters.
>> Right. Individual glyphs.
> That's not the same thing, and I don't see how the latter can work  
> if given:
> p::text("f") { color: blue; }
> and the text contains the word "fluoride" in a font with an "fl"  
> ligature.  In that case there are two characters, one glyph.  Are  
> you saying that glyph should be either all blue or all not blue?   
> Which one?

Good question, which I don't know the answer to. I would think "not  
all blue". What do you suggest? Stick to character level, not glyph  

>>> Because there are no text nodes containing "bar".
>> Right. That is how I was imagining it.
> What if "bar" is split over two adjacent textnodes in the DOM?

Forgive my ignorance, but when does that happen? Can they be treated  
as one?

>> I think HTML entities should probably be converted to Unicode  
>> before comparing, but I don't feel strongly about that.
> HTML entities are converted to Unicode in the process of DOM  
> construction; by the time you have a DOM there are no more HTML  
> entities in it.

OK, good. 

Received on Monday, 4 January 2010 01:42:55 UTC