Skip to content

Commit

Permalink
Fix chrome subpixel calculation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
auscaster authored Mar 8, 2021
1 parent 60ce3d5 commit 39ddf84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/computed-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default () => {
e.style.cssText = 'width:10px;padding:2px;box-sizing:border-box;';
element.appendChild(e);

value = window.getComputedStyle(e, null).width === '10px';
value = Math.round(getNumber(window.getComputedStyle(e, null).width)) === 10;

element.removeChild(e);

return value;
Expand Down

0 comments on commit 39ddf84

Please sign in to comment.