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

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
http://hiveminds.info/
http://soopahman.com/

Received on Wednesday, 22 October 2003 11:14:45 UTC