Re: [css3-cascade] Proposed property: rule( sSelector );

>> 1) This is impossible today: what if the CSS author of some section of a site is a designer, who owns
>> neither the HTML the CSS is applied to (assume that HTML is generated by some complex server-side
>> code the developers are not touching), nor the CSS for the overall site (it could be owned by some other
>> division, the customer for which this company is contracting with, etc).
>>
>> How can this designer possibly inherit the styles in the overall sheet? They can't; they're left to copy
>> and paste, giving way to minor inconsistencies now and major maintenance problems later.
>
> I can see how using the comma operator would be very difficult in your first
> example, and not ideal in the second example.
>
> However, both examples are easily solved using mult-classes

Yes, but this now comes down to a problem with design vs semantics.

Consider that the HTML for a 3-column layout is:

<div id="links"/>
<div id="content"/>
<div id="related"/>

This is semantically well. Now, suppose a CSS Zen Garden style site - an approach much-vaunted
by CSS enthusiasts (myself included). Suppose that in one of the alternate designs, you wanted
to apply the border color used on content - which is defined in global.css - to the border
color of links and related.

Now, you could use multi-classes, yes. This would involve modifying the global.css so that
the border color is no longer in #content but rather, say, .column. You'd then add .column to
all three div tags, and you're done.

That's fine, but not in a Zen Garden style site, where changing the look and feel means NEVER
touching the HTML. This is the ideal I'm trying to push for, and I think it's the goal of CSS
in general. A Zen Garden style site emphasizes this goal but preferably any site could receive
such a thorough redesign without touching the HTML.

If there's more than 1 CSS file on the site - which is ideal on a large site, and it's large
sites that truly stand to benefit from this separation of semantics and design - the comma
operator cannot do this for you. The only way is some form of rule importing mechanism, which
does not exist today.




-Chris "SoopahMan" Moschini
http://hiveminds.info/
http://soopahman.com/

Received on Tuesday, 4 November 2003 13:57:43 UTC