Re: Text selector [was Re: breaking overflow]

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?

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

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

-Boris

Received on Sunday, 3 January 2010 21:14:50 UTC