- From: Stephen McGruer via GitHub <sysbot+gh@w3.org>
- Date: Wed, 21 Aug 2019 13:37:33 +0000
- To: public-fxtf-archive@w3.org
To expand slightly: the value of offset-distance is specified as [<length-percentage>](https://drafts.csswg.org/css-values-4/#typedef-length-percentage), similar to properties such as `width`, but it's computed value is specified in a unique manner (as xidachen noted above): `For <length> the absolute value, otherwise a percentage.` This does not specify what to do for `calc(..)` values (as far as I know), and as such different browsers have chosen different behaviors. This is not related to interpolation, it can be seen with the simple example of: ``` <style> #foo { offset-distance: calc(0% + 10px); } </style> <div id='foo'></div> <div id='writer'></div> <script> writer.innerText = 'The computed offset-distance for foo is: ' + getComputedStyle(foo).offsetDistance; </script> ``` In Chrome this produces `10px`. In Firefox this produces `calc(0% + 10px)`. The additional side-question that xidachen listed above is "why is it important that the percentages are not resolved?" The spec does not make it clear. -- GitHub Notification of comment by stephenmcgruer Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/365#issuecomment-523460629 using your GitHub account
Received on Wednesday, 21 August 2019 13:37:35 UTC