RE: [Css Variables] Variable Declaration Blocks

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 {
	 mySimpleVariable: 5px;
	 myComplexVariable {
	     width: 5em;
	     height: 5em;
	 }
	}

But how would you treat a subsequent
  @define constant mySimpleVariable
assignment in the same document?

This is where Andrew wants the first clause to have
precedence and this means we either have to invent a 
position-dependent specificity calculation or change 
the cascade algorithm.

We already have !important for explicitly pointing
out a certain rule to have precedence.

Best regards
Mike Wilson

Received on Friday, 26 September 2008 12:47:46 UTC