https://drafts.csswg.org/cssom-1/#resolved-values
Currently today all engines return the used value for the inset properties (top/right/bottom/left).
It could be possible to place further restrictions on when this occurs based on the position of a box.
Specifically it may be web-compatible to do this for:
sticky (relatively new position mode).
relative, implementations returning junk information[1] for the "interesting" cases.
The primary use-case for this is to determine the used offsets when things are absolutely positioned.
Thoughts?
[1] See: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11960 - Even though the used value of top should be 0px implementations will non-zero values.
https://drafts.csswg.org/cssom-1/#resolved-values
Currently today all engines return the used value for the inset properties (top/right/bottom/left).
It could be possible to place further restrictions on when this occurs based on the
positionof a box.Specifically it may be web-compatible to do this for:
sticky(relatively new position mode).relative, implementations returning junk information[1] for the "interesting" cases.The primary use-case for this is to determine the used offsets when things are absolutely positioned.
Thoughts?
[1] See: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11960 - Even though the used value of
topshould be0pximplementations will non-zero values.