Re: Multiple Background Images

*fantasai* <fantasai.lists@inkedblade.net>:
> 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 (...)

What I meant was that only one choice out of the list gets applied.

>>> background-image: url(foo), url(bar);
>> Would "bar" be visible at all with
>>    background-repeat: repeat, no-repeat;
>
> If bar is partially transparent, yes.

You mean "foo"?
Let me rephrase: What is the stacking order of the backgrounds like (first  
at top or at bottom)? When 'background-position' is omitted, are all  
images stacked upon each other in the upper left corner (and then  
repeated) or is there a sequence: position the first image and repeat it  
as specified, then find the first pixel position it does not occupy and  
insert and repeat the second one there?

>> 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?

Actually I don't even have a use-case for multiple backgrounds, but to  
make full use of inheritance and the cascade, it is often useful to change  
just a certain property (like 'border-top-color')---that more or less  
applies here to.
IIRC nothing should happen on "property: ;" except that rule being  
ignored, thus "property: , value-for-2nd;" seems quite logical to me and  
doesn't require a new ubiquitous keyword like 'no-change' or 'current'.

Btw.: I've frequently seen requests whether it was possible to attach  
varying font-sizes or even -styles to the items in a 'font-family'. The  
usual unsatisfying answer is of course 'font-size-adjust'.

>> Who needs multiple backgrounds for one box anyway?
>
> Designers who are currently inserting extra <div>s to do the job.

I've not seen that often, but when, it was either (ab-)used to simulate  
fancy borders or there already was a suitable child or parent element that  
wasn't used due to cluelessness or browser bugs. Anyway, for those  
throwing in 'div's, a pseudo-element might have been a solution closer to  
their thinking.

Received on Wednesday, 1 December 2004 15:03:23 UTC