You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to [css-syntax]4.3.12.&4.3.13. as well as [css-values]5. numbers are parsed and processed with the maximum possible precision.
However, [cssom]6.7.2. specifies a maximum precision of 6 digits (7th for rounding) for serialization.
So serializing and re-parsing can change values. For example, JavaScript modifications of style sheets can have unexpected and unavoidable side-effects.
To demonstrate a worst-case: image-orientation:44.99999deg computes to 0deg, but after serialization and re-parsing computes to 90deg, as it was rounded to 45deg.
So the question is: Should parsing also limit precision or is there a different solution?
The text was updated successfully, but these errors were encountered:
According to [css-syntax]4.3.12.&4.3.13. as well as [css-values]5. numbers are parsed and processed with the maximum possible precision.
However, [cssom]6.7.2. specifies a maximum precision of 6 digits (7th for rounding) for serialization.
So serializing and re-parsing can change values. For example, JavaScript modifications of style sheets can have unexpected and unavoidable side-effects.
To demonstrate a worst-case:
image-orientation:44.99999deg
computes to 0deg, but after serialization and re-parsing computes to 90deg, as it was rounded to45deg
.So the question is: Should parsing also limit precision or is there a different solution?
The text was updated successfully, but these errors were encountered: