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

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 UTC