W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Re: min-width:auto and max-width:auto proposal / was overflow:none

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 31 May 2004 14:58:09 -0700
To: www-style@w3.org
Message-ID: <20040531215809.GA5925@darby.dbaron.org>
On Monday 2004-05-31 14:32 -0700, Andrew Fedoniouk wrote:
> min-width: auto if width set to value other than 'auto'
>    exactly as like min-width has no value set.

This rule causes your proposal not to satisfy one of the major use cases
met by my proposal.  ('intrinsic' and 'min-intrinsic' must be defined in
a way that is not affected by the 'width' property of the styled
element, only by the *width properties of its descendants.)

> intrinsic-max-width for a <P> means its maximum width (min width needed to
> show the paragraph as one line)

It's nowhere near that simple in the presence of 'float' and 'clear'.
(I've been working on a more detailed description of how 'intrinsic' and
'min-intrinsic' would be defined.)

> Same rule apply to heights.

Are heights really that easy?  Percentage sizing (especially of replaced
elements with one dimension 'auto') may be problematic, as can various
combinations of 'float' and 'clear'.

> Motivations:
> Above-stated will allow to model current HTML layouts for e.g. images,
> tables, etc.
> without need to introduce 'intrinsic' and 'min-intrinsic' values, (C)  David
> Baron.

I don't like adding more 'auto' values -- 'auto' should be avoided when
possible since it's basically meaningless.  'auto' is often used for
things that have to switch their behavior based on other things (e.g.,
whether element is replaced or non-replaced).

I'd prefer adding keywords that do what they mean and then, if needed,
defining 'auto' values in terms of them (e.g., defining 'width: auto' in
terms of 'width: shrink-wrap' [1] and 'width: fit' [2] depending on other
properties).

> (actually there should be one more value - max-intrinsic then)

What's the difference between 'intrinsic' and 'max-intrinsic'?

> It seems that Internet Explorer is using: min-width:auto for any element in
> its default stylesheet.

This would only be true if you fix the flaw I point out in my first
comment above.

> All UA's behave as TABLE { max-width:auto } set and in effect.
> To see what I mean load following:
> <TABLE border=1><TR>
> <TD>one two three</TD><TD>four five six</TD>
> </TR></TABLE>
> and try to resize UA's view.
> This table seems as it has width:auto, max-width:auto, min-width:auto set.

Tables are somewhat special because they have to simultaneously satisfy
potentially incompatible constraints from multiple sources in order to
make the grid line up.

Also, if the flaw I pointed out in my first comment were fixed, this
would again no longer be true.

> All UA's behave currently as { min-height:auto; max-height:auto } set and in
> effect for any element.

Eh?  How is this different from saying the default value of 'height' is
'auto'?  Again, this wouldn't be true if the proposal were corrected to
fix the flaw pointed out in my first comment.

-David

[1] http://lists.w3.org/Archives/Public/www-style/2003Mar/0109.html
[2] fit to the containing block, i.e., what 'width: auto' now does
  for non-replaced non-positioned non-floating blocks

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Received on Monday, 31 May 2004 17:58:42 GMT

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