W3C home > Mailing lists > Public > www-style@w3.org > October 2010

[css3-writing-modes], option #4, use of CSS constants

From: Andrew Fedoniouk <andrew.fedoniouk@live.com>
Date: Mon, 25 Oct 2010 21:35:08 -0700
Message-ID: <BAY141-DS589563A4593DC2E9C7705F8420@phx.gbl>
To: <www-style@w3.org>
CSS constants is a generic way of adding "virtual properties and values".

So if we would have CSS constants then anyone will able to declare 
the following:

@media writing-direction(ttb)
   @const margin-start: margin-top;
   @const margin-end: margin-bottom;
@media writing-direction(ltr)
   @const margin-start: margin-left;
   @const margin-end: margin-right;
@media writing-direction(rtl)
   @const margin-start: margin-right;
   @const margin-end: margin-left;

   @margin-start: 20px; /* declaration of 'logical' properties */
   @margin-end: 10px;

constants in CSS have its own value and are useful in many 
other cases too.


1) Given option does not require creation of any new attributes.
@margin-start and @margin-end are just "conditional aliases" of
margin-left and margin-right. 

2) We don't need to worry in the spec about particular names -
authors may choose anything they like.

3) This will support any other forms of "property virtualization",
even those we don't know yet.

3) @const's are very useful by themselves.


1) @const'ants need to be added to CSS.

Hope all of this makes sense.

Andrew Fedoniouk

Received on Tuesday, 26 October 2010 04:35:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:40 UTC