Re: Background Properties to CSS3

Bjoern Hoehrmann wrote:
> 
> * Juan Fabian wrote:
> >1.0 The 'background-quantity' property:
> >
> >-------------------------------------------------
> >       'background-quantity'
> >-------------------------------------------------
> >
> >Value: infinite | <integer> | inherit | initial
> >Initial: infinite
> >Applies to:  all elements
> >Inherited:  no
> >Percentages:  N/A
> >Media:  visual
> >
> >If a background image is specified, the
> >value of 'background-quantity' determines
> >how many times the image will repeat.
> 
> Hm, can you please provide some use case for this property? When does
> anyone want to specify that some background image is only repeated e.g.
> thrice?




I've desired something like this when I've wanted to create the effect
where the content of a page is against some background image, but where
things begin to "fall off the edge" of the page I want to see the
background colour, which serves as an "infinite" background should the
content need to extend beyond the edge of the image part.

One example might be if you want to fade between 2 colours as the
background of the page. On can of course, achieve this with tables or by
introducing extra fixed/absolute <div> elements in the page structure.

I'd like to extend background-repeat to have more horizontal and
vertical control. Currently repeat, repeat-x and repeat-y play two
roles: repeat makes the background image tile, and one can make an image
repeat only horizontally or only vertically but *not* both horizontally
and vertically without tiling.

Why would this be useful? It would let you do edge effects on boxes - so
I would want to write something like:

p {
	background-position: bottom right;
	background-repeat: repeat-x repeat-y;
}

The only change here would be to make specifying both repeat-x and
repeat-y meaningful.

which would give me something like this:

----------------------
|                    +|
|                    +|  
|                    +|
|                    +|
|                    +|
|                    +|
|                    +|
|++++++++++++++++++++*|
-----------------------

Where * is my original image, and + are the repeated copies of it. 

Of course, this limits one to borders which look OK when repeated in the
horizontal and vertical direction (ie, probably fairly limiting). To
really solve that problem one would need to support multiple background
images in one box which could be hard for implementors.
Perhaps at that point it would make more sense to define a border-image
property, if that covers enough of the useful cases.


-- 
AndyT (lordpixel)

Received on Monday, 8 October 2001 13:16:58 UTC