Re: breaking overflow

On Jan 2, 2010, at 7:01 PM, Tab Atkins Jr. wrote:

>> Well then, we still need "white-space-collapse: discard" [1], if you want to use it with that "specific and bizarre" HTML. What else you got?
> 
> Ah, I'd completely forgotten about that property.  Thanks for pointing
> it out!  It'll be helpful when it gets supported.

You're welcome, and agreed, very helpful. The WD is from 2007. I would love to see at least Webkit and Mozilla support at least that one property. 

On the other hand, if there was a pseudo-element to select a string of text wherever it occurred, then that would be powerful, and could also handle suppressing spaces. For instance, lets say you had something like this (with the optional second argument, "i", meaning "case insensitive"):

p::text("bar",i) { font-weight: bold; }

<p>Foo Bar Baz</p>

Then "Bar" would be bold. 

So to suppress spaces between each inline-block LI in a UL, you could just use this:

ul::text(" ") { display: none; }
li::text(" ") { display: inline; }

This could be limited to text within the same text node, to avoid some of the problems with pseudo-elements like "::first-line".

Received on Sunday, 3 January 2010 05:19:47 UTC