W3C home > Mailing lists > Public > public-cdf@w3.org > September 2007

Re: 300x150 px defaults too aggressive

From: Jonathan Watt <jwatt@jwatt.org>
Date: Mon, 17 Sep 2007 12:51:35 +0200
Message-ID: <46EE5C37.7040609@jwatt.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: www-svg@w3.org, www-style@w3.org, public-cdf@w3.org

Bjoern Hoehrmann wrote:
> * Jonathan Watt wrote:
>> While working on the replaced element code for Mozilla I've come across some
>> cases where the behavior currently mandated by the CSS 2.1 text is
>> counterintuitive, and unnecessarily so. Please consider the following case
>> (contrived for simplicity), where the ’width’ and ’height’ attributes provide
>> the intrinsic width and height:
>>
>>   <svg style="width:100%;" width="100%" height="100px"/>
>>
>> Since the intrinsic and specified widths are both 100%, and the intrinsic height 
>> is 100px, one might reasonably expect the replaced element to have a used width 
>> of 100% and a used height of 100px. However, the current CSS 2.1 text says the 
>> used height must be 150px. (Note the SVG in this example has no intrinsic ratio 
>> because the ’width’ attribute has a percentage value.)
> 
> Is there some up to date description that defines the various intrinsic
> properties of the SVG document? For example, per section 6.17 of SVG 1.1
> I would arrive at a different conclusion than you do above,

http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing

> and last I
> checked there were disputes whether percentage widths / heights can ever
> contribute to intrinsic heights / widths / ratios,

That's an orthogonal discussion that isn't relevant to the cases I'm concerned 
with as far as I can see.

> not to mention that
> the effect of SVG view specifications on this has yet to be defined, see
> e.g. http://lists.w3.org/Archives/Member/w3c-css-wg/2007JanMar/0069 and
> follow-ups (member-only).
 >
> I think before the CSS Working Group can consider changes to the text in
> CSS 2.1, we need to have a clear and complete description of the SVG
> side of the issue, so we can properly evaluate the impact of any change
> (which will be hard enough with multiple accumulated change proposals).

Although it's SVG that has brought this to my attention, I don't think this is 
necessarily an SVG issue. It's simply an issue of the CSS spec covering the 
cases where replaced elements have only _one_ of intrinsic width or intrinsic 
height, and no intrinsic ratio - a case that doesn't seem to have been considered.

> That aside, could you give some real world example where you'd write the
> code above?

The less contrived case would be when the SVG is embedded by reference and the 
CSS is on the embedding element (e.g. HTML <object>).

Jonathan
Received on Monday, 17 September 2007 10:51:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 December 2014 20:08:05 UTC