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

Re: [CSS21] table-caption width

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 07 Sep 2010 16:23:27 -0700
Message-ID: <4C86C96F.50605@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
On 08/19/2010 05:16 PM, fantasai wrote:
> On 06/14/2010 03:51 PM, fantasai wrote:
>> So the spec currently says that the anonymous table box (the table caption's
>> containing block) has the same width as the border box of the table.
>> Unfortunately, this causes the table caption to overflow in cases where its
>> contents are wider than the border box.
>> I think it would be better to say that the anonymous table box is as wide
>> as max(table-width, table-caption-min-intrinsic-width). ...
> Ok, so I've puttered around with that testcase and the behavior in
> Mozilla is kinda weird and not super-useful. The most consistent
> behavior is the implementations that follow the spec exactly, and
> make the outer table box exactly the width of the table box (which
> triggers the aforementioned overflow). Prince, Opera, and IE8 all
> follow the spec on this.
> ...
> Another possibility is to have the width of the caption factor into
> the width of the table, as if it were a table cell, which is what
> Konqueror does (and, IIRC, a number of older browser implementations
> did). This is currently allowed per spec for auto table layout, and
> might be the most useful option.
> Suggesting this behavior more explicitly would require changes to
> the informative section on table widths, something like the following:

New proposal, incorporating notes in the minutes that explicit width
restraints should be honored --

    # This gives a maximum and minimum width for each column.

Insert paragraph break and the following text:

    | The caption width minimum (CAPMIN) is determined by calculating
    | for each caption the minimum caption outer width as the MCW of a
    | hypothetical table cell that contains the caption formatted as
    | "display: block". The greatest of the minimum caption outer
    | widths is CAPMIN.

>   # Column widths influence the final table width as follows:
>   # 1. If the 'table' ... other than 'auto', the property's value
>   #    as used for layout is the greater of W and the minimum width
>   #    required by all the columns plus cell spacing or borders
>   #    (MIN). If W is greater than MIN, the extra width should be
>   #    distributed over the columns.
> s/Column widths/Column and caption widths/
> s/the property's value as used for layout/used width/
> s/W and/W, CAPMIN, and/
> s/If W/If the used width/
>   #  2. If the 'table' ... has 'width: auto', the table width used
>   #     for layout is the greater of the table's containing block
>   #     width and MIN.
> s/the table width used for layout/used width/
> s/width and MIN/width, CAPMIN, and MIN/
>   #     However, if the maximum width required by the columns plus
>   #     cell spacing or borders (MAX) is less than that of the
>   #     containing block, use MAX.
> s/if the/if either CAPMIN or the/
> s/use MAX/use max(MAX, CAPMIN)/

Received on Tuesday, 7 September 2010 23:24:03 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:50 UTC