Re: CSS-Tranformation mechanism and modularizing CSS

I _know_ that STTS can do all this, but STTS is not going to be implemented
in the big browsers. CSS3 on the other hand IS, so it's just waiting until
the functionality of STTS is incorporated in CSS3.

This was a proposal to do this, concerning element attributes. It's
relatively
simple to implement, considering that the content property already exists
and
that BECSS requires the same functionality.

So what I think is important is that it is CSS3 functionality, not that it
is
possible with some kind of proposal. I want to prevent all the new
'on(event*)'
properties, if there is a simple, way more general solution.

Considering the relatively low amount of extra coding to implement such
powerfull things as:

IMG[src2]:hover {
    @attributes {
        src: attr(src2);
    }
}

(I can't help it, I really *LOVE* this example)

Moreover: consider the way BECSS will be implemented. If an event is fired,
the implementation has to check in the CSS-properties if there is a handler
defined, and else look in the document tree. This will be hacked with a lot
of if_then_else statements for each eventhandler. It's much nicer to modify
the code for the content property and code a general way for CSS to provide
alternative attributes to the original document.

Sjoerd Visscher

----- Original Message -----
From: Daniel Glazman <Daniel.Glazman@der.edfgdf.fr>
To: Sjoerd Visscher <sjoerd@heeten.nl>
Cc: <www-style@w3.org>
Sent: Sunday, October 03, 1999 11:31 PM
Subject: Re: CSS-Tranformation mechanism and modularizing CSS


> >
> > 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 Monday, 4 October 1999 17:46:27 UTC