Re: [css3] [css21] browser specific CSS

On 4/20/11 5:51 AM, Glenn Linderman wrote:
> The scrollbars are positioned in the padding area, but the size of the
> padding is not reduced, rather the size of the content area is reduced.

Ah, more precisely the size of the containing block is reduced, yeah.  OK.

>> You have that backwards.  If the containing block assumes that it
>> needs a scrollbar and lays out at a width that is actually wider than
>> the table's intrinsic width and the table has a width that depends on
>> its parent then this can cause the table's height to get _smaller_
>> (because it's being laid out wider).  And at that smaller height it
>> does not need a scrollbar.  So you relayout assuming you don't need a
>> scrollbar, but at that smaller width you get a bigger height which
>> does need a scrollbar.
>
> I might have it backward, but this explanation sounds backward to me...
> when you relayout assuming you don't need a scrollbar, you have more
> width, not a smaller width.

If your width is _fixed_ this is true, per our discussion above.  If 
your width is not fixed, then "relayout assuming you need a scrollbar" 
means "relayout at width == intrinsic + scrollbar" whereas "relayout 
assuming you don't need a scrollbar" means "relayout at width == 
intrinsic".  As long as your scrollbar width is positive, the latter is 
a smaller width.

> Maybe there are too many cases floating
> around.  Can we handle the case where the table is constrained by its
> parent separately from the case where it is not?

Not easily, no.  Consider the case when there are multiple tables in the 
float, some constrained by it and some not.  (Assuming I understand what 
you mean by "constrained", which I think is actually an incorrect 
assumption here.  I assume it to mean the table width depends on the 
width of the ancestor in a way other than via it establishing a 
containing block that affects shrink-wrapping.)

> OK, so for the case where it is, the constrained width can be called X,
> and height Y.

You're conflating width and height constraints here, for what it's 
worth...  And the problem is that we're trying to figure out what X 
should be.  So we don't know what it is at this stage.

> Assume, that you need a scrollbar, and that scrollbars
> are 16px wide.  So the table must fit in an area of  X-16px by Y.  The
> height of the table can then be determined by the content, the rows, and
> the widths of the columns.

The widths of the columns depend on X, in general.

-Boris

Received on Wednesday, 20 April 2011 15:37:51 UTC