W3C home > Mailing lists > Public > www-style@w3.org > January 2001

CSS grammar: a bit more structure.

From: Biep Durieux <bdurieux@baan.com>
Date: Mon, 22 Jan 2001 08:52:18 -0500 (EST)
Message-ID: <41F966E6F6E5D311AFE000508B6FC21E04B24974@ex-nld-u2.baan.com>
To: "'www-style@w3.org'" <www-style@w3.org>
CSS has a very flat structure, in several respects.  Here I should like to
propose a change in the language to counter that in one of these respects.

As CSS grows, there will be more and more features that take (the same)
composite value.
Up till now this has been solved by the use of hyphens:
font-size
border-top-width

If we were to introduce composite types, one might (knowing that "border"
had type "LINE") state:
p.boxed {border: (width: 10; color: brown);}

This would have several advantages:
(1) Visual grouping, which can be traced by intelligent editors
(2) Textually shorter specification
(3) More modular definition: if the definition of "LINE" changes, one
doesn't have to adapt all the definitions of the properties that take a line
as their value
(4) Enforced uniformity: all lines will automatically accept the same
specification unless explicit exceptions are stated.

Of course for a (long) while the hyphenated style should be accepted too, at
least for features from CSS 1 & 2

A slightly more extended hypothetical example for tooltips:
title has type TEXTAREA, which contains properties for a.o. background and
font:

p.titled {title: (background: (color: yellow;); font: (size: 8pt; weight:
thin;););}

Or, if people prefer to mention the type explicitly:

p.titled {title: (Textarea
                   background: (Background color: yellow;);
                   font: (Font size: 8pt; weight: thin;);
                  );
         }


Any reactions?


J. A. Durieux
software engineer

Baan Dimensions 
Solutions for the
Metals, Paper & Cable Industries
Tel.	: + 31 (0) 318  - 58 77 40        
Fax.	: + 31 (0) 318  - 58 77 48
Email	: BDurieux@baan.com
http://www.baandimensions.com
Received on Monday, 22 January 2001 09:36:47 GMT

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