Re: Border and background images

Anne van Kesteren wrote:

>
>> background-1-image: url('foo.png');
>> background-1-position: left top;
>> background-1-repeat: repeat-x;
>>
>> etc?
>
>
> I thought of this syntax, but didn't post it because it looks very 
> bad. Especially since you need to define some new grammar. The 
> '-{number}-' part is never used before in CSS. (Maybe because you 
> create a infinite number of properties this way.)
>
>
>> z-indexes are calculated as usual, i.e. the last background image is the
>> topmost one.
>
>
> This is different. Since 'z-index' calculated normally relies on the 
> DOM of the styled document, no? It would make /some/ sense if the 
> highest number was the lowest background. So 'background-1-image' 
> would be on top.
>
>
>> If you want to explicitely specify a z-index:
>> background-1-z-index: 4;
>> You'd need to have for all of them to display as indended, I propose, 
>> to be
>> consistent with the "normal" z-index for elements, where the fourth 
>> element
>> doesn't have a z-index of 4, either, if it hasn't been assigned a 
>> z-index.
>>
>> I don't see any implementation problems here. Of course, 
>> background-image
>> should be available for BC.
>
>
> Although it is backwards compatible in terms of authoring, UAs 
> probably have to rewrite their code for backgrounds to deal with this. 
> It would be quite a large change if it was introduced like this.
>
> Creating test cases for it would be even more difficult.
>
>

Going by the implementation of Mozilla's (gecko's) style parser, we 
would need (without alot of work) a whole slew of "parsed" properties to 
support this, one for *each* background-#-....   which means each 
element will have a COMPUTED style for background-1-... to 
background-999999999999999999-... (where 9999... could be replaced with 
MAX_UINT or some such)  which means REAL SLOW.

I dont see a reason for rewriting the parsing syntax for backgrounds 
alone. IMO

~Justin Wood

Received on Saturday, 28 August 2004 18:14:03 UTC