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

On 6/2/10 4:22 PM, Håkon Wium Lie wrote:
> For example, 'margin-start: 10px' is an alias that is resolved when
> the computed value of 'writing-mode' has been determined;
> 'margin-start' is then resolved into 'margin-left: 10px', 'margin-top:
> 10px', or 'margin-right: 10px' (as you show in [1]).

So this is happening on the _computed_ style level, not specified style, 
right?

> Likewise, when the value of 'margin-start' is queried through the DOM,
> 'writing-mode' will be consulted to determine which of 'margin-left',
> 'margin-top', 'margin-right' that should be consulted to determine the
> value. (Or, alternatively, one could leave it to an external
> script/library to do this job.)

Is the above talking about getComputedStyle?  I would certainly hope 
that given:

   <span style="margin-start: 20px;"
         onclick="alert(this.style.getPropertyValue('margin-start'));">
     Click me
   </span>

the value alerted doesn't depend on any computed writing-mode values!  I 
would _especially_ hope that's the case for:

   <style id="x">
     * { margin-start: 20px; }
   </style>
   <script>
     alert(document.getElementById("x").sheet.cssRules[0].style
                   .getPropertyValue("margin-start"));
   </script>

since in that case there's no way to even talk about "the value of 
writing-mode" in a sane way.

-Boris

Received on Wednesday, 2 June 2010 20:50:27 UTC