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

Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 02 Jun 2010 23:24:15 -0400
Message-ID: <4C07205F.6040003@mit.edu>
To: Håkon Wium Lie <howcome@opera.com>
CC: www-style list <www-style@w3.org>
On 6/2/10 5:09 PM, Håkon Wium Lie wrote:
> getComputedStyle should work, no?

Yes, for figuring out the style of a particular node.

> It seems fair that one cannot expect APIs meant for specified property
> values to work for aliases -- 'margin-start' is an alias, not a
> property.

Hold on.  So I can write "* { margin-start: 20px }" in my CSS, but I 
can't do this in JS?

   var sheet = document.styleSheets[0];
   sheet.insertRule("* {}", 0);
   sheet.cssRules[0].style.setProperty("margin-start", "20px", "");

Why shouldn't I be able to do that?  Why shouldn't I be able to do 
thisElement.style.setProperty("margin-start", "3px", "")?

That is, it seems like you have defined this thing to be an "alias" 
(whatever that is, _that_'s not defined) for some reason and are now 
arguing circularly that this means specified values for it "shouldn't 
work".  But why shouldn't they?  Specified values for *-start/end are 
dead simple; it's the computed and used values that are complicated!

-Boris
Received on Thursday, 3 June 2010 03:24:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT