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

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

From: Chris Moschini <cmoschini@myrealbox.com>
Date: Wed, 22 Oct 2003 11:14:45 -0400
To: www-style@w3.org
Message-ID: <1066835685.7f27c6e0cmoschini@myrealbox.com>

I thought a lot about this possibility last night and two things occurred to me.

One is that a better syntax may be:

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

I polled around a bit and rule: didn't go over well, it looks too much like another property. The @ character better suggests that something is importing another like thing, so perhaps this is a better fit.

Second, it may make sense to allow @rule to be used as a global case as above, and also as the value of a property, for example:

p.section { color: @rule( "div.section" ); }

Meaning you pull in only the color for div.section. This would offer authors more flexibility for unifying styles.

Thus a single product page on an E-commerce site could get its product image border color from the vertical divider color (whatever that may be) in the sitewide CSS file:

.product img { border-color: @rule( "div.content" ); }

All thoughts appreciated.

-Chris "SoopahMan" Moschini
Received on Wednesday, 22 October 2003 11:14:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:09 UTC