W3C home > Mailing lists > Public > www-style@w3.org > October 2003

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

From: Tex Texin <tex@i18nguy.com>
Date: Tue, 21 Oct 2003 15:51:57 -0400
Message-ID: <3F958E5D.840A4746@i18nguy.com>
To: Chris Moschini <cmoschini@myrealbox.com>
Cc: www-style@w3.org

FWIW, I like this suggestion very much.

Besides the bloat, it will be a more effective way for authors to document
what's common and what's different between rule sets, since they can define a
common group and reference it in conjunction with the specific differences for
any selector.
That is more readable than scanning a file and trying to accumulate the
multiple references to shared subgroupings of rules.

However, you might want to consider some guidelines for location or ordering of
these indirections, since you can have circuitous references. Or you could
limit the levels of indirection.

 p.section { rule( "div.section" ); }
 div.section { rule( "p.section" ); }

Relative references need to be clarified. If div.section {font-size : 10%},
then does p.section use 10% of its parent, or does it gain the calculated value
of div.section's font-size?

Also, I assume this is just a "compile-time" relationship. If I make a change
dynamically with the DOM to div.section, p.section is not updated right?

I think with some clarifications this is a good addition.
tex


Chris Moschini wrote:
> 
> I'm stating the CSS3 Cascading and Inheritance module but it may be more appropriate elsewhere, even on its own... .
> 
> I'd like to propose as an addition to CSS3 the ability to apply another selector in a selector's definition. That is:
> 
> p.section { rule( "div.section" ); }
> 
> Let's say I had a p tag with class "section". This tag would be styled with whatever rules the Cascade applies to div.section.
> 
> A rule like this would reduce the primary reason I see for bloat in existing CSS usage, with the exception of gratuitous browser hacks.
> 
> -Chris "SoopahMan" Moschini
> http://hiveminds.info/
> http://soopahman.com/

-- 
-------------------------------------------------------------
Tex Texin   cell: +1 781 789 1898   mailto:Tex@XenCraft.com
Xen Master                          http://www.i18nGuy.com
                         
XenCraft		            http://www.XenCraft.com
Making e-Business Work Around the World
-------------------------------------------------------------
Received on Tuesday, 21 October 2003 15:52:36 GMT

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