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

Re: New Working Draft : BECSS

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 5 Nov 1999 05:30:40 +0000 (GMT)
To: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9911050504420.2322-100000@mary.bath.ac.uk>
On Wed, 3 Nov 1999, Jan Roland Eriksson wrote:

>>># CSS style sheets consist of declarative property/value pairs
>>># assigned to element selectors. They contain no executable code.
>>> I do not think it is prudent to remove the "no" in the last
>>> sentence at this point. I believe it's in everyone's long term
>>> interest -- including web designers -- that executable code is
>>> kept out of CSS.
>> Why?
> 
> At the end of 1996, NS was suffering a lot of ridicule for their
> much less than acceptable JSSS proposal, already implemented in an
> upcoming NS4 and as such it needed a big "cover up" action when it
> became clear to NS that this time they did really lose the race in
> favor of CSS1. (we are all suffering from that still today)

JSSS had many other problems. The fact that it contained executable
code was a minor detail.

 
> 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.


On Wed, 3 Nov 1999, Håkon Wium Lie wrote:
> I'm happy for these to live in the same file as long as they're not
> labelled "text/css". We could find a new Content-type for the mix of
> declarative CSS and imperative whatever.

Ok, fine, let's register a new MIME type "application/css" and be done
with it. I don't mind what its called, so long as it can do what I
want! :-)

-- 
Ian Hickson
"So far, people have shown a reasonable amount of sense in evaluating
souls (whether they are properly priced)."
  -- Nick Gibbins; Author of http://totl.net/Soul/, 1999-10-05
Received on Friday, 5 November 1999 00:30:43 GMT

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