Re: Proposal: content-size value for 'height'

On Thursday 17 July 2008 02:04, fantasai wrote:
> Andrew Fedoniouk wrote:
> > Michael A. Puls II wrote:
> >> Problem: Make an iframe or object's height expand to the height of
> >> its content
> >
> > .....
> >
> > David Baron proposed once to use 'max-intrinsic' and
> > '[min-]intrinsic' values for length units.
> >
> > frame
> > {
> >   overflow: hidden;
> >   min-width: min-intrinsic; /* so will never overflow in x
> > direction  */ height: intrinsic; /* and neither do in vertical */
> > }
> >
> > p
> > {
> >   width: max-intrinsic; /* will never wrap */
> > }
>
> The WG accepted to use those keywords in the next Box Module draft.
>
> http://www.w3.org/blog/CSS/2007/11/14/resolutions_3
>
> I don't think we discussed behavior for replaced elements such as
> <iframe>s though.

No, and we also didn't define them for heights, only widths. But I'd 
like them to be defined (as I said in another thread last Friday).

It's not so difficult (at least in principle, writing it up clearly and 
precisely is going to be a challenge :-) ). First of all, unlike 
for 'width' there is no difference between the three keywords 
('min-content', 'max-content' and 'available') when used on 'height'. 
Secondly, for replaced elements with an intrinsic ratio, they simply 
mean the same as 'auto'. Finally, for replaced elements without an 
intrinsic ratio, they do *not* mean the same as 'auto' (because 'auto' 
already means 150px), but they basically mean the height of the thing 
if it were displayed in a window of its own with the width as given.

In fact, "without an intrinsic ratio" is not completely correct. There 
are replaced elements with a "complex" intrinsic ratio and those 
without any ratio at all. An example of the former is HTML: given a 
width, it has a definite height, but the function that relates the 
height to the width is not linear. An example of the latter is an 
infinitely scalable graphic: for any given width it can have any given 
height and there is no way to tell what the right height is. In such a 
case I guess we fall back to 150px again.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Thursday, 17 July 2008 19:34:13 UTC