- From: Samwul Datong <emarketing@passagegoldtravels.com>
- Date: Fri, 22 May 2015 14:37:45 +0100
- To: www-style@w3.org
Received on Friday, 22 May 2015 15:23:37 UTC
CSS3 uses the cascading set of rules and the !important keyword to determine which style rule among many conflicting rules should apply to an object/item. However, with the heavy use of classes in css frameworks, the current system might not be totally appropriate to address all use cases. I'm proposing a new simple css rule-weight property which can be added to any set of rules. The simple idea is that a set of rules with a heavier weight should take precedence over lighter weights. e.g. ..class1 {color:blue; font-size:1em; rule-weight:10} ..class2 {color:red; background-color:#b2b2b2; text-align:center; rule-weight:50} <div class="class1 class2">Hello World</div> Here, for any rules defined in both class1 and class2, the rules in class2 would take precedence because class2 has a higher rule-weight than class1. This should make working with stylesheets simpler and easier to understand
Received on Friday, 22 May 2015 15:23:37 UTC