W3C home > Mailing lists > Public > www-style@w3.org > November 2011

Re: inherit property

From: Райчо Райков <raycho.raykov@gmail.com>
Date: Fri, 11 Nov 2011 09:04:45 +0200
Message-ID: <4EBCC90D.7010105@gmail.com>
To: mikewse@hotmail.com
CC: www-style@w3.org
На 09.11.2011 00:13, Mike Wilson написа:
> Райчо Райков wrote:
>> I was always interested why in CSS not implemented inheritance from
>> another style.
> You may be interested in looking at
> http://disruptive-innovations.com/zoo/cssvariables/
> which was implemented in WebKit for a while. Also search for CSS variables
> in the www-style mailing list archives from 2008, to get an idea of how hard
> it is to find consensus on this subject ;-)
> Best regards
> Mike Wilson

Variables are easiest way to give us top level rules. They will solve 
the problems, especially if they incorporate some kind of calculations.

     @variable a 12px
     @variable b = a + 5%

Actually, inheritance, about which I'm talking, is converting properties 
to variables, with standardized names. Maybe they shouldn't be 
standardized at all:

     .s1 { main-color: green; color: main-color; }
     .s2 { border-color: s1.main-color; }

Or just use already suggested @variable.

But I think @variable must exist too. Also I can suggest that right word 
must be @constant, because if we have calculations in CSS, it will 
become some kind of scripting language.
Received on Friday, 11 November 2011 07:05:45 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:06 UTC