Re: ECMAScript in CSS aka "Expressions"

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
> subject...
>
> But what is the current state of "ECMAScript in CSS" aka
> "Expressions" (as a recommendation put forward to the W3C by
> Microsoft)

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
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Tuesday, 15 March 2005 13:10:10 UTC