- From: Mike Wilson <mikewse@hotmail.com>
- Date: Sun, 28 Sep 2008 22:20:50 +0200
- To: "'Brad Kemper'" <brkemper.comcast@gmail.com>
- Cc: <www-style@w3.org>
Brad Kemper wrote: > Mike Wilson wrote: > > We already have !important for explicitly pointing > > out a certain rule to have precedence. > > Not the same thing. Sorry, I wasn't clear to what I was referring to here. It was this part that you suggested in your previous mail: > > Brad Kemper wrote: > > > But if the author wanted it to act as a constant, > > > where "first rule overrides later rules", he > > > could add a keyword to that rule that would > > > accomplish that by adding 1,000,000 to the > > > specificity calculation: > > > > > > @define constant { > > > ... Having the keyword "constant" add a certain number to the specificity calculation only make those rules win over rules without the keyword, and doesn't implement the "first rule overrides later rules" algorithm. Thus, if you have two rules with the same "constant" selector the latter will win according to the cascade. That's why your suggestion is similar to what is already implemented by !important. I understand that what you really wanted was to have "first rule overrides later rules" but then you will have to either invent position-dependent specificity or change the cascade algorithm, not just let a keyword add a number to the spec calc. Best regards Mike Wilson
Received on Sunday, 28 September 2008 20:21:36 UTC