- From: L. David Baron <dbaron@dbaron.org>
- Date: Wed, 16 Jun 2010 10:17:38 -0700
- To: Peter Moulder <peter.moulder@monash.edu>, www-style@w3.org
On Wednesday 2010-06-02 17:27 +1000, Peter Moulder wrote:
> What effect, if any, should 'min-height' or 'max-height' have on table cells
> or rows?
I can see four possibilities:
(1) They don't apply.
(2) They apply per-element: in other words, for each cell, we
compute what is approximately a single computed height (which
may be 'auto'). This isn't quite as straightforward to define
as it sounds, but it's relatively simple to define in another
manner: the height of the row is the largest of:
(a) the heights required by the cells and their alignment
(b) the 'min-height' of each cell or the row
(c) min('height', 'max-height') for each cell or the row,
treating 'auto'/'none' as infinitely large
((b) and (c) require describing how to handle border and
padding, which is different for cells and for rows, and border
is different for the separated borders model and the collapsed
borders model)
(3) They apply to the whole row, but don't override the intrinsic
heights. In other words, the height of a row is the larger of:
(a) the heights required by the content of the cells and their
alignment
(b) the larger of:
(i) the largest 'min-height' of the cells or the row
(ii) the smaller of:
((1)) the smallest 'max-height' of the cells or the row
((2)) the largest 'height' of the cells or the row
(with the same rules about border/padding inserted
appropriately)
(4) They apply to the whole row, and do override the intrinsic
heights. In other words, the height of a row is the larger of:
(a) the largest 'min-height' of the cells or the row
(b) the smaller of:
(i) the smallest 'max-height' of the cells or the row
(ii) the larger of:
((1)) the largest 'height' of the cells or the row
((2)) the height required by the content of the cells
and their alignment
(with the same rules about border/padding inserted
appropriately)
The same issue also applies to min-width and max-width on cells and
columns, where I believe Gecko implements (2) above.
Then there's also the question of what min-width and max-width do on
rows and the table itself, and what min-height and max-height do on
columns and on the table itself. (I prefer the idea that they have
no effect on rows/columns, but do affect the table.)
It's also not clear what percentage values should do in all cases.
Due to the complexity involved, I would tend to prefer leaving this
undefined in CSS 2.1 (but perhaps making it more explicitly
undefined).
-David
--
L. David Baron http://dbaron.org/
Mozilla Corporation http://www.mozilla.com/
Received on Wednesday, 16 June 2010 17:18:11 UTC