W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: User constant declarations in style sheets

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 27 Apr 2005 11:42:55 +0300
Message-ID: <426F508F.6060004@peda.net>
To: www-style@w3.org

Werner Donné wrote:
> David Woolley wrote:
>>The key design rule for CSS grammars is backwards compatibility.  All new
>>syntax must result in the new construct being ignored by browsers that 
>>don't support the new features.
> 
> If the "lh" in the example would be interpreted as a unit by a browser that
> doesn't support the constants feature, the browser would have to conclude a
> wrong length was specified and should therefore ignore the rule. What is so
> special about it then?

The problem is that *you* get to define what "lh" means. For 
example, in your example you defined that
const lh: 1.2em;
which means that 2lh is equivalent to 2.4em if I've understood 
correctly. The point is that *if* this is allowed there's no way to 
ever define any new unit without requiring UA to support this 
"const" feature too. For example, W3C couldn't define a new unit 
"lh" because your already example uses it. If W3C defined lh as 
anything else but "1.2em", your stylesheet would get broken - that 
is, unless the UA also supported "const" so it could decipher what 
your stylesheet really means. UA shouldn't be required to support 
"const" feature to support all the units defined in the spec.

The problems that need to be solved:

1) How to express contants so that old UA correctly ignore those?
2) Does this feature prevent other features in the future?
3) How does the cascade work with the user style sheet?
4) If user style sheet already defines similarly named constant, 
what should happen?

In the end, the question remains: is it really worth the trouble 
considering that real world UAs would support this feature only 
after a really long time?

-- 
Mikko
Received on Wednesday, 27 April 2005 08:43:32 GMT

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