W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: HTML5 feedback from prominent designers

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 01 Sep 2009 23:04:08 -0400
Message-ID: <4A9DE0A8.30006@mit.edu>
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
CC: public-html@w3.org
Lachlan Hunt wrote:
>> Figure
>>
>> We suggest that, by default, UAs render figure width no wider than
>> the video, image, or canvas that it contains...
> 
> I agree with this.  One way to achieve this is to make the default 
> styling for figure be:
> 
> figure { display: inline-block; }

I don't think this does the right thing.  Or at least it doesn't do what 
was quoted.  For example, if there is space on the line and the caption 
is wider than the image, this will make the figure wide enough for the 
caption to not line-break, won't it?

> I've also previously wrote some CSS using display: table; instead, which 
> would give a similar result, but which had some nice benefits for the 
> caption with the use of caption-side.  However, I think using 
> inline-block is probably a better choice for default styling.
> 
> http://lists.w3.org/Archives/Public/public-html/2007Sep/0375.html

I think this might be the only way to achieve the desired effect with CSS.

-Boris
Received on Wednesday, 2 September 2009 03:11:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:07 UTC