Jonathan Watt wrote:
> Boris Zbarsky wrote:
>> Jonathan Watt wrote:
>>> Can we implement -moz-fill for the 'height' property as well as the 
>>> width property?
>>
>> It would only work if the parent has a height that doesn't depend on 
>> child heights, right?
> 
> Yes.
> 
>  > What would be the use cases?
> 
> I'm thinking about SVG here. I want a good way to fit SVG snuggly into 
> it's containing block without it bursting out because it has 
> padding/borders/margins (as it would if given a height of 100%). Of 
> course it would be useful in other scenarios too, e.g. canvas.

You should be able to use -moz-box-sizing: border-box; height: 100%; here.
Note also that the CSS spec effectively triggers this behavior in the width
dimension if the image has an aspect ratio but no explicit width or height:
   http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width

~fantasai
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to