W3C home > Mailing lists > Public > www-style@w3.org > October 1999

Re: CSS-Tranformation mechanism and modularizing CSS

From: Daniel Glazman <Daniel.Glazman@der.edfgdf.fr>
Date: Sun, 3 Oct 1999 23:31:40 +0200 (MET DST)
Message-Id: <199910032131.XAA14905@cli51ak.der.edf.fr>
To: sjoerd@heeten.nl (Sjoerd Visscher)
Cc: www-style@w3.org
> 
> You can see it as this: if one can set the content of an
> element, one should also be able to set the attributes of
> an element.
> 
> Let me give some examples of a way of setting attributes:
> 
> IMG[descr]
> 
>     /* This rule sets the alt attribute the value of
>        the descr attribute and adds a counter. */
>     @attributes {
>         alt: "Picture " counter(picture) ": " attr(descr);
>     }
>     counter-increment: picture;
> }

Or :

  IMG[descr] { modify-context : [alt="Picture" counter(picture) ": :" attr(descr)] ;
               counter-increment : picture }

You should _really_ take a look at the STTS 3 Submission made by
Electricite de France to the W3C...

> IMG[src2] {
>     /* This rule switches the image between scr and scr2 */
>     @attributes {
>         onmouseover: "this.src1=this.src;this.src=this.src2;";
>         onmouseout: "this.src=this.src1;";
>     }
> }

Not at all : it does not switch images, it sets attributes that define
a switch between images when the mouse is over the the IMG.
That, STTS can do.

> IMG[scr2]:hover {
>     /* This is a shorter version of the previous rule */
>     @attributes {
>         src: attr(src2);
>     }
> }

Well, STTS is not dynamic for the moment so :hover does not exist in
STTS but... ;-)

</Daniel>
Received on Sunday, 3 October 1999 17:32:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:00 GMT