W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: [CSS21] Scaling of replaced elements

From: James Hopkins <james@idreamincode.co.uk>
Date: Wed, 30 Dec 2009 16:40:59 +0000
Cc: www-style@w3.org, Tantek Çelik <tantek@cs.stanford.edu>
Message-Id: <168E5520-0163-4CC6-8B1F-92F46EC1FC33@idreamincode.co.uk>
To: fantasai <fantasai.lists@inkedblade.net>
> James Hopkins wrote:
>> Currently, the spec [1] states that, for replaced elements with an  
>> intrinsic ratio, it is an optional requirement that a UA scale the  
>> element.
>> I'd like to propose that the current spec is further clarified so  
>> that scaling a replaced element is recommended (SHOULD), as opposed  
>> to just optional (MAY).
>> Leaving scaling as optional could (although unlikely) result in a  
>> vendor implementing behavior that differs from currently consistent  
>> implementations in other browsers - FF, Safari, IE, and Opera all  
>> scale replaced elements (which have an intrinsic ratio) in this  
>> way. More so, authors have become reliant on the behavior found in  
>> these existing implementations, and to allow the possibility of a  
>> differing implementation would no doubt affect interoperability.
>>
>> [1] http://www.w3.org/TR/CSS21/visudet.html#the-width-property
>
> While for bitmap images this is the right thing to do, other objects
> such as Java applets are also replaced elements, and even if they
> have a preferred size and intrinsic ratio, scaling them graphically
> is rarely the right thing to do.

I must admit I have no experience in embedding a Java applet into a  
web page, so I couldn't comment specifically. However, after some  
brief testing with embedding Flash, I believe that the object itself  
has an internal scaling mechanism, which scales independently of the  
explicit dimensions assigned to the HTML element ('width' and 'height'  
attribute values) to which it's attached.

> So I don't think we want to require
> scaling of the replaced elements' contents.


I too, don't believe that this behavior should be REQUIRED. Instead,  
what I'm proposing here, is a change from OPTIONAL to RECOMMENDED. The  
reasoning behind my proposal also takes into account the significantly  
larger proportion of bitmap images - compared to other types of  
replaced elements - that are embedded into web pages. However, as per  
RFC2119 [1], this change would still allow exceptions to the rule; for  
instance, if a vendor deems scaling a certain type of replaced element  
to be disadvantageous.

[1] http://www.ietf.org/rfc/rfc2119.txt
Received on Wednesday, 30 December 2009 16:41:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:47:12 GMT