CSS values auto founded in getComputedStyle()

Confirmed Issue #10216218 • Assigned to Saqib A.

Details

Created
Dec 15, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

static posihttps://jsfiddle.net/ttvh84ro](https://jsfiddle.[https://jsfiddle.net/ttvh84ro](https://jsfiddle.net/ttvh84ro) 

relative posihttps://jsfiddle.net/ttvh84ro/1](https://jsfiddle.[https://jsfiddle.net/ttvh84ro/1](https://jsfiddle.net/ttvh84ro/1)

absolute posihttps://jsfiddle.net/ttvh84ro/2/](https://jsfiddle.[https://jsfiddle.net/ttvh84ro/2/](https://jsfiddle.net/ttvh84ro/2/)

 

By default when setted propertie left:100px function getComputedStyle(e,null)[‘right’] define valuse as auto instead of -100px. This issue brokes a programm logic.
In other browsers this values always have inverted calculated values.
Example. left:-200px getComputedStyle(e,null)[‘right’] === 200px
Example. right:300px getComputedStyle(e,null)[‘left’] === -300px

In Explorer and Edge when values left or right not setted getComputedStyle(e,null)[‘left’ || ‘right’] === auto instead of zero(0).

Please fix it.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Steps to Reproduce

      Changed Assigned To from “Brad E.” to “Saqib A.”

      Changed Status to “Confirmed”

    • Computed value: if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto’.
      http://www.w3.org/TR/CSS2/visuren.html#propdef-left

      However, left was one of those properties which should return the used value instead of the computed value.
      https://drafts.csswg.org/cssom/

      I guess the intent was indeed to have browsers return a pixel value all the times.
      That means you cannot know based on which edge(s) the element is docked but since you can’t in Chrome and Firefox anyway, our behavior is not useful to authors in practice.

    You need to sign in to your Microsoft account to add a comment.

    Sign in