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

Re: [css3-tables] Optimize per column whitespace due to line wrapping

From: Shelby Moore <shelby@coolpage.com>
Date: Sun, 2 Jan 2011 12:28:11 -0500
Message-ID: <bb77b09146328de187b1e04ff30ba506.squirrel@sm.webmail.pair.com>
To: "timeless" <timeless@gmail.com>
Cc: www-style@w3.org
"timeless" <timeless@gmail.com> wrote:
> On Sun, Jan 2, 2011 at 7:03 PM, Shelby Moore <shelby@coolpage.com> wrote:
>> Apparently you have the window width that just luckily makes it appear
>> there isn't a problem.
>
> Oh, I see problems, but afaict they're required by the markup. Could
> you provide an example of what you'd like to see? (although perhaps
> some pictures would be helpful, this text markup in plaintext which is
> rendered in a proportional font is a disaster.)
>
>> On my wide screen, I see:
>>
>> ? ( Recurse |                              Recurse ? ?,  First-set...
>>                        ? ? Fi(n), n ? N, n = head(w) )  First-set...
>> where Recurse is (Fi(n) \ ?) ? Fi(tail(w))               First-set...
>>
>> The excess gap can be as large as the width of the "Recurse ? ?,".
>>
>> Or more generally, the excess gap can be as large as the shortest
>> wrapped
>> word.
>
> If you didn't have an &nbsp; after the commas, the browser would have
> more freedom [...]

The &nbsp; has nothing to do with the problem.  The problem is the column
layout algorithm tries to give the column the maximum width of the column
text as it would be UNwrapped.  If the window is not wide enough, it
proportions the available width to the columns, based on the maximum width
of their text UNwrapped.  Thus any wrapping that occurs is not factored
into proportioning the column widths optimally.

What should happen is that after laying out the table with the
proportioned widths per the current layout algorithm, there should follow
be a second-pass, where (per column) the minimum size of the wrapped words
for each column (aka the excess wrap whitespace) are removed. I was
incorrect in my first post to ponder if this had to be gradient search or
multi-pass-- rather it is a deterministic 2nd pass.

I think it can be explained simply in ascii, I will add *********** below
where the excess space is:

>> ? ( Recurse |***********                   Recurse ? ?,  First-set...
>>              ***********? ? Fi(n), n ? N, n = head(w) )  First-set...
>> where Recurse is (Fi(n) \ ?) ? Fi(tail(w)) ***********   First-set...
>>
>> The excess gap can be as large as the width of the "Recurse ? ?,".

Notice that *********** is less than or equal to the width of "Recurse ? ?,".
Received on Sunday, 2 January 2011 17:28:37 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT