Re: [CSS2 counters] Is it possible to evaluate a value inside CSS?

On Tue, 16 May 2006 14:22:02 +0200, Daniel MD  
<danielmendes@im-thinking.com> wrote:
>> According to the prose in section 4.3.4 of CSS 2.1 and section 3.7.2 of  
>> the CSS3 Values WD, this isn’t allowed. If it were though, the syntax  
>> would have to be like <content-list> in the ‘content’ property:
>>
>>   url(counter(list,decimal) ".gif")
>>
>> Strings need to be quoted, and things are concatenated by separating  
>> them with a space.
>
> I also tried that syntax in fact it was the first one i tried, it also  
> does not work, how does the counter get evaluated... is there any way to  
> do something like url(toString(counter(list, decimal)) ".gif"); ?

That's not the problem. The problem is that something like that is not  
allowed as Laurens pointed out.


> I think i need to get into the inner workings of the counter and URL  
> parameters see how they are implemented and try to see if there is a way  
> to get the return from the counter propriety, and concatenate it with  
> the file extension... any pointers on how to do this?

It won't work. The property values that look like functions don't actually  
work like they would in programming languages. So for now there's no way  
to do what you want.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Tuesday, 16 May 2006 12:33:19 UTC