GoogleChromeLabs / ProjectVisBug

FireBug for designers › Edit any webpage, in any state https://a.nerdy.dev/gimme-visbug
https://visbug.web.app
Apache License 2.0
5.47k stars 287 forks source link

fix: uses parseFloat to handle borderWidth between 0 and 1 #599

Closed Gregory-Gerard closed 1 year ago

Gregory-Gerard commented 1 year ago

Hello! First PR on VisBug 😄

Sometimes depending on the browser zoom, the borderWidth can be between 0 and 1. Because of the parseInt, in these cases, the value was hidden, even though it was greater than 0.

Example, with a zoom of 150% and a borderWidth of 1px, the rendered borderWidth is 0.667px.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1732769

Comparison between computed styles of Chrome DevTools and VisBug: CleanShot 2023-04-04 at 21 17 28

I would also like to thank all contributors for this amazing tool.

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Gregory-Gerard commented 1 year ago

your code change to a float from int works as advertised! thanks for this contribution, I'm surprised I hadn't seen it yet, it's great. 🙂

but, can you isolate the commit by removing the linter corrections that are also part of the commit? hope that's not too annoying to ask you to change. after that, it's good to go 👍🏻

Hey! Happy that you appreciate my contribution. And sorry it is PhpStorm removing trailing spaces 😄

I've removed linter corrections from my commit!