Re: New Working Draft : BECSS

Ian Hickson wrote
>On Wed, 3 Nov 1999, Jan Roland Eriksson wrote:
> > The line has to be drawn somewhere and I say that no executable
> > code, not even in it's absolute simplest form, as in a function call
> > to a scripting language as a property value, should be let in there,
> > period.
>
>That is simply unrealistic.
>
>How would you make every <counter> element with an attribute
>"writable" increase one of its attributes by one of its other
>attributes when clicked on?
>
>With BECSS it is easy (with apologies for the errors which are bound
>to be in my DOM+ECMAScript):
>
>   counter:after { content: attr(count); }
>   counter[writable] { onclick: "this.getAttribute(count) = ToString(
>                                 ToInteger(this.getAttribute(count)) +
>                                 ToInteger(this.getAttribute(step)))"; }
>
>Find an equivalent way of doing it in five lines or less which does
>not mix executable code and CSS content, and which can be linked to as
>many documents as required, and I may change my mind.

Excuse me, but what does a counter have to do with style?
If you're going to create that kind of interactive content, then I would
recommend assembling a QuickTime movie instead. (Check out LiveStage from
Totally Hip <http://www.totallyhip.com/> to see some "running code".)

I'm a programmer, so I love code. But I have to agree with Jan and Hakon. :-)
Let's leave CSS code free. Although I would like to see some "bracketing"
-- I'll talk about that in a separate message.


-Walter
 back on www-style after a 2-year absence
___________________________________________________________________________
 Walter Ian Kaye, Menlo Park, CA, USA | Programmer - AppleScript/FaceSpan,
 http://www.natural-innovations.com/  |              Perl, HTML, & ProTERM
 http://www.oschoice.org/             |   Musician - Guitarist, Songwriter
 _____________________________________|___________________________________
 Perl on Unix, AppleScript on MacOS, at the nation's first WWW server
 http://www.slac.stanford.edu/~boo/     AOL/AIM: Boo First

Received on Saturday, 6 November 1999 00:42:35 UTC