Re: HTML5 feedback from prominent designers

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