W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: breaking overflow

From: Brad Kemper <brad.kemper@gmail.com>
Date: Sat, 2 Jan 2010 21:19:12 -0800
Cc: www-style list <www-style@w3.org>
Message-Id: <CDC2A509-D411-4CDC-8686-6FA143A5AC6E@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:41 UTC