Re: processing one element multiple times in CSS 2 or 3?

Steve Tinney wrote:

> Given:
>
>         <a x="1" z="3"/>
>         <a x="6" y="2"/>
>         <a z="5"/>
>
> is there any CSS rule set *other than listing all possible permutations*
> which will enable processing of each of the attributes of <a> something like
> this:
>
>         a[x=1]:after { content: 'a'; }
>               a[x=6]:after { content: 'f'; }
>         a[y=2]:after { content: 'b'; }
>         a[z=3]:after { content: 'x'; }
>         a[z=5]:after { content: 'v'; }
>
> to produce:
>
>         ax
>         fb
>         v
> ?
>
> Or is this completely beyond the pale of CSS philosophy?
>

I don't think there is in CSS2. You could only do that if the content
added
after the <a> element was the same in all cases, in which case you'd use
a
comma-seperated list of the rules. I didn't see anything in CSS3 like
that,
looking at the selectors module specification. You will just have to
list all
the possible possibilities. Even if you were dealing with numbers (for
example
height and width of images), there seems to be no equivalent of a
construct
meaning "if greater or equal than X and lesser or equal than Y, then
apply this
style". Sorry.


--
Andrew MacKinnon
andrew_mackinnon_2000@yahoo.com
http://www.geocities.com/andrew_mackinnon_2000/

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Received on Tuesday, 15 May 2001 16:24:12 UTC