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

Re: IDs, Classes : could CSS usefully use a third (abstract) concept ?

From: Ben Curtis <bcurtis@bivia.com>
Date: Fri, 11 Mar 2005 15:38:35 -0800
Message-Id: <e35b25aba5355666ac06ac83c054220b@bivia.com>
Cc: www-style@w3.org
To: Laurens Holst <lholst@students.cs.uu.nl>

>>> Also a syntax like @define could allow great interaction with 
>>> imported stylesheets. If the format were strict such that the  CSS 
>>> document  would have to be structured  as
>>>
>>>  - @definitions
>>>  - @imports
>>>  - css rules
>> It is worth noting that this functionality, being client-side, offers 
>> abilities that are impossible or highly convoluted server-side. 
>> Therefore, @define or similar syntax serves a valuable and practical 
>> purpose.
>> Some example uses that would be exceedingly difficult server-side:
>> 1. An XML-syndicated content provider supplies an accompanying 
>> embedded stylesheet that handles layout, sourced from their server 
>> and adjusted on occasion to take into account new content styles.
....
> For this and 2. as well goes: How is the publisher agreeing with the 
> client on a fixed set of @defined names different from them agreeing 
> on a fixed set of class names? I can answer that question myself: it 
> is not.


The difference does not exist in a static world. However, the advantage 
to this technique is similar to the advantage of pulling presentational 
description out of the markup and into the CSS: in a dynamic and 
changing world of collaborators, you need only work with other people 
once, at the beginning, to arrange what rules should govern future 
development. After that agreement, each is free to develop at will.

If the publisher were to radically change the formatting of the 
content, then it's likely the classes and ids in the markup would 
change. Thus, in order for the publisher to know that the subscriber 
was going to display something in a manner that fits her web page, the 
publisher would need to re-coordinate with all subscribers. With a 
means for the subscribers to define things that then the publisher 
uses, this coordination is automatic and works according to the 
original agreed-upon rules.

Defined values (or even whole declarations, as the original poster was 
suggesting) make these sorts of things easy to do and directly 
associated with the task; the means to do many of these things do exist 
now but are complex and indirect. Although I am squarely in the camp 
that claims the trend in CSS spec is toward excessive complexity, I 
believe that new specifications that make certain commonly-desired 
tasks easy reduce the overall complexity of using CSS even if they 
increase the complexity of the spec.

-- 

	Ben Curtis : webwright
	bivia : a personal web studio
	http://www.bivia.com
	v: (818) 507-6613
Received on Friday, 11 March 2005 23:46:43 GMT

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