The CSSOM spec[1] describes the value returned by getComputedStyle() is the "resolved value" which is defined[2] for box-offset properties to be the used value (assuming "display" is not "none").
However, the box-offset properties may conflict. For example, you may say "top: 5px, bottom: 5px;". In this situation, the spec[3] dictates that the used value of "bottom" will be minus the value of "top".
However, all browsers[4] currently return "5px" from getComputedStyle() on such an element. Therefore, the spec is not web compatible.
Instead, the spec should state that getComputedStyle() returns the computed value of the box-offset properties if they are over-constrained.
[1] https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle
[2] https://drafts.csswg.org/cssom/#resolved-value
[3] https://www.w3.org/TR/CSS21/visuren.html#relative-positioning
[4]
- Microsoft Edge 25.10586.0.0 / Microsoft EdgeHTML 13.10586
- Firefox 50.0a1 (2016-06-20)
- Firefox 47.0
- Chrome 53.0.2773.0 canary
- Chrome 51.0.2704.103
- Safari 9.1.1
- WebKit r202242
The CSSOM spec[1] describes the value returned by getComputedStyle() is the "resolved value" which is defined[2] for box-offset properties to be the used value (assuming "display" is not "none").
However, the box-offset properties may conflict. For example, you may say "top: 5px, bottom: 5px;". In this situation, the spec[3] dictates that the used value of "bottom" will be minus the value of "top".
However, all browsers[4] currently return "5px" from getComputedStyle() on such an element. Therefore, the spec is not web compatible.
Instead, the spec should state that getComputedStyle() returns the computed value of the box-offset properties if they are over-constrained.
[1] https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle
[2] https://drafts.csswg.org/cssom/#resolved-value
[3] https://www.w3.org/TR/CSS21/visuren.html#relative-positioning
[4]