Re: Percentage Height of a Replaced Element in a Table Cell

On Thu, Aug 9, 2012 at 11:15 PM, "Gérard Talbot" <css21testsuite@gtalbot.org
> wrote:

>
> > 10.
>
>  http://roberthogan.net/css/max-height-percentage-replaced-006.htm
>
>
> html, body, table, tbody, td {
>                 width: 100%;
>                 height: 100%;
>                 padding: 0;
>                 margin: 0;
>                 vertical-align: top;
>             }
>
>
> table-row-groups can not be set a height; that's given by the spec or
>
> http://wiki.csswg.org/spec/css2.1#issue-133
>
> and table-row-groups can not be set to a width
>
> 10.2 Content width: the 'width' property
>
> 'width'
>     Applies to:         all elements but non-replaced inline elements,
> table
> rows, and row groups
>
> http://www.w3.org/TR/CSS21/visudet.html#the-width-property
>
> So, we have again a situation where any size is possible, permissible.
>


Hi Gérard,

Is tbody a red-herring in this test case then? Would the behaviour be any
better defined if I said:

html, body, table, td {
                width: 100%;
                height: 100%;
                padding: 0;
                margin: 0;
                vertical-align: top;
            }

Or is the initial containing block rule not coming into play at all here?

Thanks,
Robert


> >
> > Only WebKit fails this one.
>
> There is no unique possible rendered layout for this test. This test
> would be rejected if it was submitted for CSS 2.1
>
> > As I understand it the rule applied here is
> > that "A percentage height on the root element is relative to the initial
> > containing block." - so giving a 100% height to the html element means
> > that
> > the image with a max-height of 100% in the table cell ends up
> > constrained
> > to it - i.e. it can't overflow out of the root element and the root
> > element
> > is constrained to the viewport. Again I hope to fix this in WebKit bug
> > 43319.
>

Received on Sunday, 12 August 2012 16:24:37 UTC