W3C home > Mailing lists > Public > www-svg@w3.org > May 2005

Re: [SVGMobile12] Initial viewport sizing, again

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 10 May 2005 19:11:39 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-svg@w3.org
Message-ID: <Pine.LNX.4.61.0505101910010.20097@dhalsim.dreamhost.com>

On Tue, 10 May 2005, Boris Zbarsky wrote:
> 
> However, the width and height attributes are allowed to have percentage 
> values (most obviously, they default to 100% if not set).  There is no 
> indication what the values are percentages _of_ in this specification.  
> This makes it rather difficult to make this case (which is the default 
> case) work....

That's a CSS issue. The CSS working group has decided to make the 
following changes to address this:

Replace CSS 2.1 section 10.3.2 "Inline, replaced elements" with:

   A computed value of 'auto' for 'margin-left' or 'margin-right'
   becomes a used value of '0'.

   If 'width' has a computed value of 'auto' and 'height' also has a
   computed value of 'auto', the element's intrinsic width is the used
   value of 'width', if it has one.

   If 'width' has a computed value of 'auto' and 'height' has some
   other computed value, and the replaced element has an intrinsic
   ratio, or, if both 'width' and 'height' have computed values of
   'auto', and the element has no intrinsic width but does have an
   intrinsic height and intrinsic ratio, then the used value of
   'width' is:

     (intrinsic ratio) * (used height)

   Otherwise, if 'width' has a computed value of 'auto', but none of
   the conditions above are met, then the used value of '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.

   Percentage intrinsic widths are first evaluated with respect to the
   containing block's width, if that width doesn't itself depend on
   the replaced element's width. If it does, then a percentage
   intrinsic width on that element can't be resolved and the element
   is assumed to have no intrinsic width.

Replace CSS 2.1 section 10.6.2 "Inline replaced elements, block-level
replaced elements in normal flow, 'inline-block' replaced elements in
normal flow and floating replaced elements" with the following:

   If 'margin-top', or 'margin-bottom' are 'auto', their used value is
   0.

   If 'height' has a computed value of 'auto' and 'width' also has a
   computed value of 'auto', the element's intrinsic height is the
   used value of 'height', it has one.

   If 'height' has a computed value of 'auto' and 'width' has some
   other computed value, and the replaced element has an intrinsic
   ratio, or, if both 'height' and 'width' have computed values of
   'auto', and the element has no intrinsic height but does have an
   intrinsic width and intrinsic ratio, then the used value of
   'height' is:

    (used width) / (intrinsic ratio)

   Otherwise, if 'height' has a computed value of 'auto', but none of
   the conditions above are met, then the used value of 'height' must
   be set to 150px. If 300px is too wide to fit the device width, UAs
   should use the height of the largest rectangle that has a 2:1 ratio
   and fits the device width instead.

   Percentage intrinsic heights are evaluated with respect to the
   containing block's height, if that height is specified explicitly,
   or if the replaced element is absolutely positioned. If neither of
   these conditions is met, then percentage values on such replaced
   elements can't be resolved and such elements are assumed to have no
   intrinsic height.

   For 'inline' and 'inline-block' elements, the margin box is used
   when calculating the height of the line box.

Replace the definition of "Replaced element" in section 3.1
"Definitions" with:

   An element that is outside the scope of the CSS formatter, such as
   an image, embedded document, or applet. For example, the content of
   the HTML IMG element is often replaced by the image that its "src"
   attribute designates. Replaced elements often have intrinsic
   dimensions: an intrinsic width, an intrinsic height, and an
   intrinsic ratio. For example, a bitmap image has an intrinsic width
   and an intrinsic height specified in absolute units (from which the
   intrinsic ratio can obviously be determined). On the other hand,
   other documents may not have any intrinsic dimensions (for example
   a blank HTML document).

   User agents may consider a replaced element to not have any
   intrinsic dimensions if it is believed that those dimensions could
   leak sensitive information to a third party. For example, if an
   HTML document changed intrinsic size depending on the user's bank
   balance, then the UA might want to act as if that resource had no
   intrinsic dimensions.

We hope to release a CSS2.1 updated CR that takes into account this errata 
(and other issues people have raised since we last went to CR) in the 
coming month.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 10 May 2005 19:11:51 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:30 GMT