W3C home > Mailing lists > Public > www-style@w3.org > March 2003

Re: Block element width behavior

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 17 Mar 2003 09:49:26 -0500
To: www-style@w3.org
Message-ID: <20030317144926.GA1479@pool-151-201-155-93.phil.east.verizon.net>

On Monday 2003-03-17 09:32 -0500, Stuart Ballard wrote:
> I think the spec needs to make clear exactly what the intrinsic width 
> means for a block-level element, though - in particular, it might be 
> considered to mean that no content in the block would ever get 
> word-wrapped, and that's not the desired behavior.

I'm hoping that CSS3 can define this as well.

> 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)

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'.

> How safe would it be to start writing code now that does something like 
> this:
> 
> .foo { width: 50%; width: intrinsic }
> 
> to get the desired behavior if user-agents start supporting "intrinsic" 
> in the future? Can I rely on "intrinsic" meaning what I want it to mean 
> if it's supported at all?

Not very safe.  I don't like the name 'intrinsic' and I'm hoping someone
can think of a better keyword.  We need consistent terms, too.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
Received on Monday, 17 March 2003 09:49:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:20 GMT