W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: CSS Variables Draft Proposal

From: David Singer <singer@apple.com>
Date: Wed, 16 Feb 2011 15:26:07 +0800
Cc: www-style list <www-style@w3.org>
Message-Id: <ABEB24A1-BB50-4599-85F1-5B0947A67A37@apple.com>
To: Christoph Päper <christoph.paeper@crissov.de>

On Feb 16, 2011, at 3:38 , Christoph Päper wrote:

> FWIW I’d have no problem retracting the second, exception part of that statement and therefore say: I am against making variables available across the three types of sources (i.e. user agent, author and user), no exceptions possible.

I am with you.  I think we are asking for grief making variables cross over boundaries between style-sheets that do not certainly know about each other.  That means either (a) restrict to the document in which they occur or (b) to that document and documents imported by that document.

Even in the (b) case, we would have to do the usual lexical scoping.  For example:

A stylesheet Q exists that defines variable X, and imports stylesheet R that does not use X (the author of Q can check that at the time of writing).  But the author of R is not aware of the fact that he is being used in this way. He later does a revision of R that introduces a variable X with a completely different meaning.  Within R everything is fine still; the variable there is defined and used consistently. But now the system has to remember when interpreting Q that its use of X is as defined in X, and the variable X in R is, in fact, different.

Is it harmful to have variables textually local to the document in which they occur?

David Singer
Multimedia and Software Standards, Apple Inc.
Received on Wednesday, 16 February 2011 07:27:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:43 UTC