- From: Bert Bos <bert@w3.org>
- Date: Sat, 24 Feb 2007 01:15:38 +0100
- To: Daniel Beardsmore <public@telcontar.net>
- CC: www-style@w3.org
Daniel Beardsmore wrote: > > I was looking at a grid of links to localised software downloads, each > with a flag icon next to it. Each flag is a different size, because > there is no standard aspect ratio to a flag. > > So what if there was a pad-to property? > > For example, instead of this: > > .image-container { width: 20px; height: 10px } > > <div style="image-container"> > <img ...> > </div> > > You'd just have: > > img.flag { pad-to: 20px 10px } > > This would add necessary padding to fit the desired size. All flag > images would now occupy a defined amount of space. > > Pad-to would encompass pad-to-width and pad-to-height. > > This would also allow sane vertical and horizontal alignment of any > fluid grid of images without the need for excessive tags. > > This would mostly be applicable to images, as block elements have > min-width and min-height to provide for this feature. Images, however, > need to be padded to fit. It would not be exclusive to block elements, > but block elements would be better off with marge-to ;) (increase margin > to fit, so that the border remains small) There is a proposal for this in the Paged Media module: http://www.w3.org/TR/2006/WD-css3-page-20061010/#the-fit (But the names will change in the next draft; we didn't think 'fit' was very clear.) Your example would be: img.flag { width: 20px; height: 10px; image-scaling: none } Bert -- Bert Bos ( W 3 C ) http://www.w3.org/ http://www.w3.org/people/bos W3C/ERCIM bert@w3.org 2004 Rt des Lucioles / BP 93 +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
Received on Saturday, 24 February 2007 00:15:55 UTC