W3C home > Mailing lists > Public > www-style@w3.org > March 2005

Re: ECMAScript in CSS aka "Expressions"

From: Ted Shaneyfelt <tvs@hawaii.edu>
Date: Tue, 15 Mar 2005 11:02:45 -1000
To: Bert Bos <bert@w3.org>
Cc: www-style@w3.org
Message-id: <42374D75.6090308@hawaii.edu>

Maybe a good compromise is a sum (or difference) of different units.


The units can be treated internally by an editor
like vectors with one element corresponding to each unit.
When serializing, zero-valued vectors could be omitted, but
a single zero would be generated if all are zero.

This keeps tools simple and consistent, and it may keep them
from generating overly obscure expressions with arbitrary
convoluted possibilities. (finding examples of prior art in
convoluted document encoding left as an exercise to the reader)

Bert Bos wrote:
> On Monday 07 March 2005 21:32, David R wrote:
>>This may have already been discussed, but since I haven't been a
>>member of the list for long, forgive me if I'm raising a long-dead
>>But what is the current state of "ECMAScript in CSS" aka
>>"Expressions" (as a recommendation put forward to the W3C by
> Not quite sure if this is what you mean, but the working group recently 
> decided to investigate the implications of allowing simple, linear 
> expressions as values. For example:
>     width: expr(50% + 5px);
>     font-size: expr(2em / 3 + 2px);
>     padding-right: expr(1px + 1ex - 5%);
> They make life harder for GUI-based editors, but sometimes it is handy 
> to be able to add different kinds of units together.
> Some common cases can be done without expressions, by means of a few new 
> units:
>     gd = the grid unit from CSS3 Text
>     rem = the font size of the root element
>     vw = the viewport width (or 1/100th of it)
>     vh = the viewport height (or 1/100th of it)
>     vm = min(vw, vh)
> There is not even a draft yet, though.
> Bert
Received on Tuesday, 15 March 2005 21:03:37 UTC

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