-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compare offsetHeight/getComputedStyle at scale
At very large heights based on many child elements, Chrome and even Firefox begin to diverge the computed height values from what you see at lower scales. This makes their comparison with offsetHeight less reliable at high scales. However, at large height values the exactness of the height measurement also matters less. At the end, only a limited level of precision is desired in the scale value and later code throws away noise at the lower end. So, use a more forgiving comparison methodology (% shift in the change) vs requiring the two values to be only a single digit off.
- Loading branch information
Showing
2 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters