Re: [css-logical-props] logical property values on computed style objects

On 12/30/2014 08:13 PM, Cameron McCormack wrote:
> The spec should talk about how logical properties are exposed on computed style objects.  I think it would make sense to 
> expose their logical values based on the direction/text-orientation/writing-mode values, for example:
> 
>    <style>
>      div { direction: rtl; margin-right: 10px; }
>    </style>
>    <div></div>
>    <script>
>      var cs = getComputedStyle(document.querySelector("div"));
>      alert(cs.getPropertyValue("margin-inline-start"));  // "10px"
>    </script>

Hi Cameron!
The CSSWG resolved to do as you recommended:
   https://lists.w3.org/Archives/Public/www-style/2017Feb/0060.html
The prose is here:
   https://www.w3.org/TR/css-logical-1/#box
   # APIs that return computed values (such as getComputedStyle()) must
   # return the same value for equivalent pairs of such properties.

Please let me know if this adequately addresses the issue.

Thanks~
~fantasai

Received on Tuesday, 20 June 2017 19:57:27 UTC