Re: Cascade: Supplement instead of Overwrite

On Thu, 7 Oct 1999, Sjoerd Visscher wrote:

>> THE SYNTAX:
>> 
>> There are several ways of extending the current CSS syntax in a manner
>> compatible with the forwards-compatible parsing of CSS1 to specify
>> that the cascade should be supplemental and not replacing. Here is
>> one, which uses syntax similar to the proposal for specifying minimum
>> and maximum values:
>> 
>>    property : values values ! supplement; /* e.g., counter-increment */
>>    property : values, values ! supplement; /* e.g., font-family */
> 
> Is 'old-values()' an option?
> 
> like:
> property : values old-values();
> property : values, old-values();
> property : old-values() values;
> 
> Q { quotes: "'" "'"; }
> Q { quotes: "<<" ">>" old-values() '"' '"'; }
> 

Hmm. It looks nice, but I can see some problems:

   This requires the redefinition of every property which is going to
   support this. The other suggestions use a syntax independent of the
   syntax of the property itself.

   The other suggestions allow the implementation to immediately spot
   which rules are going to use supplemental cascading, this requires
   UAs to actually parse the content of the values before being able
   to ascertain what is going on.

   To actually implement this, UAs would have to traverse the matched
   rules twice: backwards to find the first rule which didn't contain
   old-values(), and then forwards to insert the old values. The other
   suggestions only need a single traversal.

There may be others, but those are the first to come to mind.


> But I don't know about CSS1 compatability.

It's fine in that respect...

-- 
Ian Hickson
"I take a Professor Bullett approach to my answers. There's a high
probability that they may be right."
  -- Dr Snow; Mechanics Lecturer at Bath University; 1999-03-04

Received on Friday, 8 October 1999 20:50:35 UTC