Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include troubleshooting section about rounding errors #984

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jonathanloske
Copy link

I would have found it very beneficial if the readme would have included something about those weird rounding errors that sometimes pop up so I wrote a short section about that. :)

Copy link
Owner

@garris garris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Please see comment and clarify.

README.md Outdated
@@ -954,6 +954,10 @@ Sometimes bad permissions happen to good people. It's ok, this is a safe space.

Be sure to use a config `id` in your config file. See https://github.com/garris/BackstopJS/issues/291

### There's no visible difference between "Reference" and "Test" screenshots

You might run into an issue where your reference and test screenshots look seemingly identical but on further inspection have a 1px difference in height or width. To fix this, make sure your viewport is the same as the one you have setup in your configuration. Then, check whether the element you target has a height or width that is a comma-separated value (i.e. 804.25px). If so, you might have run into a rounding error. Adjusting your viewport so the element's width is a natural number will help with this.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I am not sure this is clear -- the example you give is not comma separated. Where would a user check this value?

height or width that is a comma-separated value (i.e. 804.25px)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I guess I was too much in my German mindset where we use commas instead of dots. I updated the description. Do you think it's useful now?

Also, sorry for taking so long on this, I was working on a different project in the meantime. Next answer won't take so long :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants