- From: François REMY <fremycompany_pub@yahoo.fr>
- Date: Wed, 7 Apr 2010 17:50:45 +0200
- To: "Boris Zbarsky" <bzbarsky@mit.edu>, "Anne van Kesteren" <annevk@opera.com>
- Cc: <www-style@w3.org>
To be logical, we should modify margin-top to calc(15%+1px). Or is that no more allowed by CSS-Values? -------------------------------------------------- From: "Anne van Kesteren" <annevk@opera.com> Sent: Wednesday, April 07, 2010 5:21 PM To: "Boris Zbarsky" <bzbarsky@mit.edu> Cc: <www-style@w3.org> Subject: Re: [cssom] CSS Value API > On Wed, 07 Apr 2010 15:34:35 +0200, Boris Zbarsky <bzbarsky@mit.edu> > wrote: >> On 4/7/10 5:08 AM, Anne van Kesteren wrote: >>> The idea is that it sets the first value of the shorthand >> >> That's fine. My specific question is: >> >> <div id="x" style="margin-top: 15%"> >> <script> >> document.getElementById("x").style.margin.l[0].px++; >> // What just happened in the line above? >> </script> > > I think in this case you cannot convert and it would either throw or set > the pixel value to 1. Not sure which way is better. > > Your example makes me wonder though how shorthand and individual > properties should interact. Maybe 'margin' should be a map and we should > not try to recreate syntax-level features at the CSSOM-level. Now I > phrased it like this I wonder why I ever thought otherwise. :-) I.e. the > above would become style.margin.m.top.px++. We could even have > margin.m.all.px++ or something to increase all individual properties if we > ever wanted to simplify that. > > > -- > Anne van Kesteren > http://annevankesteren.nl/ >
Received on Wednesday, 7 April 2010 15:51:19 UTC