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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 20 Jun 2017 15:56:52 -0400
To: Cameron McCormack <cam@mcc.id.au>, www-style list <www-style@w3.org>
Message-ID: <947d6bb3-a323-cc52-2a33-0cf6dc981be0@inkedblade.net>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:07 UTC