Re: Block element width behavior

L. David Baron wrote:
> On Monday 2003-03-17 09:32 -0500, Stuart Ballard wrote:
> 
>>I suggest defining it 
>>in a way that works out identical to the width of a single-cell table.
> 
> 
> I think that's the wrong way to do it.  The width of a single-cell table
> (ignoring borders and such) should be defined in terms of the widths,
> as:
> 
>   min(max(intrinsic minimum width, containing block width), intrinsic width)

Fair enough. I suppose what I was getting at is that somewhere 
(presumably) in the *current* CSS spec there's a definition that 
specifies the width of a single-cell table, and I wanted the behavior of 
"intrinsic" to be equivalent to what that definition currently says.

See below for a revised proposal based on the fact that you meant 
something different by "intrinsic" than what I did...

> Perhaps it would be good to have yet another keyword for this behavior,
> since I don't think it's possible to express it in terms of 'min-width',
> 'max-width', 'width', 'auto', 'intrinsic', and 'min-intrinsic'.  Perhaps
> 'shrink-wrap'?  Although maybe, as you propose, all we really need is
> 'shrink-wrap'.

Well, I certainly think there should be a way to express the 
"shrink-wrap" behavior, but I'm not completely sold on "shrink-wrap" as 
a name for it. (And the fact that "intrinsic" means something different 
than what I thought it meant suggests that that's not such a great name 
either).

How about:

"min-intrinsic" or "natural-min" => the minimum width that the element 
can have without overflowing its box, violating any width constraints on 
its children, or splitting any individual word. This is equivalent to 
your currently proposed "min-intrinsic", I think.

"max-intrinsic" or "natural-max" => the size that the element would take 
if given an infinitely wide containing box. I think this is equivalent 
to the size the element would have if word-wrapping were disabled 
entirely on all its contents, except for children with their own width 
constraints. This is what you are currently proposing the term 
'intrinsic' to mean, I think.

"intrinsic" or "natural" => the 'shrink-wrap' algorithm you describe above.

To be honest, I don't see much use for either the min- or max- values, 
but there's no harm in offering them, I suppose. But I do think the 
'shrink-wrap' behavior is extremely useful[1], and completely impossible 
to emulate using current CSS, short of creating artificial tables.

Stuart.

[1] Hence my use of slightly longer and more obscure names for the less 
immediately useful values, and the shorter, more obvious name for the 
value that seems to me most likely to be useful.

-- 
Stuart Ballard, Programmer
NetReach - Internet Solutions
(215) 283-2300, ext. 126
http://www.netreach.com/

Received on Monday, 17 March 2003 14:24:05 UTC