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

>>> 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 UTC