Re: Multiple Background Images

Replying on-list, as requested.

Christoph Päper wrote:
> *fantasai* <fantasai.lists@inkedblade.net>:
> 
> First of all, I don't think the comma is the best choice, because it's  
> already used in CSS for lists of ordered, mutual exclusive items.

The values in font-family aren't mutually-exclusive except on a character-
by-character basis. Similarly, the values in image backgrounds aren't
mutually-exclusive except on a pixel-by-pixel basis.

Providing multiple image formats would be, imho, best served by either
content negotiation or a url() syntax that can accept fallbacks.

>> background-image: url(foo), url(bar);
>> background-repeat: repeat-y, no-repeat;
> 
> 
> Would "bar" be visible at all with
> 
>   background-repeat: repeat, no-repeat;

If bar is partially transparent, yes.

> How can I set a property for the n-th background only?  

I don't think you can. Do you have a good use-case for it?

> Who needs multiple backgrounds for one box anyway?

Designers who are currently inserting extra <div>s to do the job.

http://www.alistapart.com/articles/slidingdoors/ avoids adding extra <div>s
because the elements being styled in this particular use case are already
paired up and the design only requires two images. (<a> + <li>)

~fantasai

Received on Wednesday, 1 December 2004 01:08:48 UTC