W3C home > Mailing lists > Public > www-style@w3.org > September 2008

RE: [Css Variables] Variable Declaration Blocks

From: Mike Wilson <mikewse@hotmail.com>
Date: Fri, 26 Sep 2008 14:46:47 +0200
Message-ID: <BAY116-DAV118A346445044B7FF2DAD7A4470@phx.gbl>
To: "'Brad Kemper'" <brkemper.comcast@gmail.com>
Cc: <www-style@w3.org>
Message-ID: <030e01c91fd5$f0114ad0$0a01a8c0@mikedeskxp>

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

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