W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: [css3-background] Distributing space for 'background-repeat: space'

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 01 Apr 2008 00:53:36 -0700
Message-ID: <47F1EA00.6040208@inkedblade.net>
To: Bert Bos <bert@w3.org>
CC: W3C style mailing list <www-style@w3.org>

Bert Bos wrote:
> The values 'round' and 'space' for the 'background-repeat' property 
> provide two different ways to ensure that a tiled background image is 
> tiled a whole number of times. 'Round' does it by shrinking the 
> image, 'space' by inserting space between the tiles.
> 
> 'Space' is meant for images that should not be scaled and are fairly 
> small compared to the element. But, of course, the specification must 
> also define what happens if the image is large. The question is how.
> 
> Let A be the width of the area and W>0 the width of the image. Then the 
> number of times the image fits in the area is N = floor(A/W) and the 
> amount of space we have to distribute is S = A - N*W. (There is a 
> similar story for the height.)
> 
> The interesting cases to look at are N = 0 and N = 1, ...
> 
> a3) The image is placed according to 'background-position'.

I think this should be obvious. The same thing happens to 'repeat' images.

~fantasai
Received on Tuesday, 1 April 2008 07:54:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:03 GMT