fantasai wrote: > Jonathan Watt wrote: >> 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.
That doesn't take margins into account (I guess there's no 'margin-box' value because of collapsing margins complexity, but perhaps it's not impossible to come up with rules for implementing that properly too). > 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 I can also use '-moz-fill' for width, but it's height that's the issue, not width. Jonathan _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

