W3C home > Mailing lists > Public > www-style@w3.org > September 2005

Re: [CSS2.1] Replaced elements

From: Bert Bos <bert@w3.org>
Date: Fri, 16 Sep 2005 14:20:38 +0200
To: www-style@w3.org
Message-Id: <200509161420.38979.bert@w3.org>

On Thursday 15 September 2005 14:54, Staffan Mhln wrote:
> Bert Bos wrote:
> > On Wednesday 10 August 2005 18:28, Staffan Mhln wrote:
> >>>On Wednesday 2005-06-15 18:24 +0200, Staffan Mhln wrote:
> >>>>Whats the reason for choosing the approach that the CSS renderer
> >>>>needs to be aware of a ratio rather than that the embedded media
> >>>>needs to be made aware of the CSS constraints?
> >
> > The CSS WG discussed your suggestion and decided not to change the
> > algorithm in CSS 2.1. There may be room for other algorithms in
> > CSS3, but that needs investigation, probably in cooperation with
> > the CDF WG.
>
> Ok, thanks for considering it. Would it be possible/useful to remove
> the HTML example and remove the fallback pixels (both of those are
> new to CSS 2.1 i belive)?

New for the CSS spec, yes, not new in practice.

Browsers have to do something. Several do 300px, so we might as well 
pick that. That's one more worry for browser makers solved.

Sometimes we can leave things undefined with the aim of fixing them 
later, when we hopefully know more. But then the thing that is 
undefined must be something that currently doesn't occur in practice, 
otherwise practice will define it for us.

Imagine that we currently expect that this case, a replaced element 
whose height depends on its width (or vice-versa) in a complex way, 
should in the future default to using that complex height. Imagine also 
that we don't know yet what property/value we are going to use to 
switch that behaviour off, or, indeed, if it isn't going to be solved 
outside CSS. Then it would be nice to be able to say that this case is 
reserved for future extensions.

But how do you reserve something? How do we avoid that people include 
objects with undefined height? Given the way the Web works, it is not 
practical to ask browsers to display an error message. So people will 
see *something*; it may even be what they want. And soon it becomes 
established practice.

Other than an error message, I can think of one other way to keep 
something reserved for future use: make the behaviour unpredictable. 
Browsers pick a random size on every (re)load.

But random behaviour isn't a tradition on the Web, so what would 
probably happen in practice is that browser makers are inundated with 
bug reports...

So we are pretty much forced to make the default behaviour something 
that we can specify now. In the future we then specify any other 
behaviour(s) with a new property or value ('height: variable' or 
'height: defer' maybe?).

>
> eg:
> http://www.w3.org/TR/CSS21/conform.html#replaced-element
> "(for example a blank HTML document)"
>
> http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width
> "becomes 300px. If 300px is too wide to fit the device, UAs should
> use the width of the largest rectangle that has a 2:1 ratio and fits
> the device instead."


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 Friday, 16 September 2005 12:20:49 GMT

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