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

[svg] Borders are blurred and moved when using non-pixel values eg. rem, em like Bootstrap #6667

Closed
aninde opened this issue Jan 27, 2020 · 6 comments
Assignees
Labels
Core: Walkontable Plugin Regression Issues that were created while adding new changes to the source code

Comments

@aninde
Copy link
Contributor

aninde commented Jan 27, 2020

Description

Borders are blurred when using non-pixel values eg. rem, em
After adding bootstrap
and surrounding div with Handsontable table with this bootstrap <h3>test</h3> (1,75 rem) Handsontable starts to be blurry.

Zrzut ekranu 2020-01-27 o 12 32 46

Demo

https://codesandbox.io/s/bootstrap-800-svg-je9wr

Your environment

  • Handsontable version: 8.0.0-svg
  • Browser Name and version: IE, Edge
  • Operating System: Windows
@aninde aninde added Core: Walkontable Plugin Regression Issues that were created while adding new changes to the source code labels Jan 27, 2020
@aninde aninde changed the title [8.0.00-svg] Borders are blurred and moved when using non-pixel values eg. rem, em or Bootstrap [8.0.00-svg] Borders are blurred and moved when using non-pixel values eg. rem, em like Bootstrap Jan 27, 2020
@warpech warpech self-assigned this Jan 28, 2020
@warpech
Copy link
Member

warpech commented Jan 31, 2020

Please provide more detailed steps to reproduce. I can't see <h3>test</h3> in https://codesandbox.io/s/bootstrap-800-svg-je9wr. Is this the correct link? I tried this link but the borders are not blurry. Tested in Chrome and Firefox (Mac, non-Retina).

@AMBudnik
Copy link
Contributor

AMBudnik commented Feb 3, 2020

Here's @aninde demo on Edge @warpech

GIF

The bottom border seems to be fine, but the left and right are blurry.
image

the same on Chrome looks well
image

also looks well in Firefox
image

@aninde
Copy link
Contributor Author

aninde commented Feb 7, 2020

Unfortunately, I can't reproduce this on Codesandbox. @budnix is able to replicate a blur locally with this code in React https://codesandbox.io/s/800beta-svg-blur-opolh.
Here is demo with Vanilla ver. https://codesandbox.io/s/funny-kepler-jcul7

@warpech
Copy link
Member

warpech commented Feb 19, 2020

The problem is related to blurry rendering of SVG when it is preceded by another element that does not have dimensions expressed in pixels.

I can simulate the same problem with a simple SVG object and:

The problem is reproducible in IE and Edge (EdgeHTML).

I don't know what to do :( I will seek help on Stack Overflow: https://stackoverflow.com/questions/60300141/blurry-path-edges-in-ie-edge-when-svg-is-preceded-by-an-element-not-sized-in-p

Screenshots

The below screenshots illustrate the problem using the JSFiddles linked above. The left part of the screenshot is Chrome, the right part is Edge (EdgeHTML).

2020-02-19 13_00_43-Window
2020-02-19 13_04_01-Window
2020-02-19 13_39_08-Window

warpech added a commit that referenced this issue Feb 19, 2020
…page (#6667)

the problem came from the fact that IE and EdgeHTML engine do not snap SVG paths to the full pixel when any of the preceding elements have a value expressed in non-px units. The solution is to transform the element by the subpixel value.
@warpech
Copy link
Member

warpech commented Feb 27, 2020

After investigation, I have to admit that the problem is not fixable in IE. This is a similar problem to 125%, 150%, 175% DPI. Whenever sub-pixel values come to play, there is very high chance that they will be rendered blurry in IE/Edge.

@AMBudnik AMBudnik changed the title [8.0.00-svg] Borders are blurred and moved when using non-pixel values eg. rem, em like Bootstrap [svg] Borders are blurred and moved when using non-pixel values eg. rem, em like Bootstrap May 11, 2020
@krzysztofspilka
Copy link
Member

This is an issue reported for the SVG borders project, which was rejected and won't be implemented in Handsontable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: Walkontable Plugin Regression Issues that were created while adding new changes to the source code
Projects
None yet
Development

No branches or pull requests

4 participants