Skip to content

During resize there sometimes is a gap between the SVG and the embedding/containing element #4328

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

Open
tobireif opened this issue Sep 18, 2019 · 5 comments

Comments

@tobireif
Copy link

Please see these browser bug reports:
https://bugzilla.mozilla.org/show_bug.cgi?id=1575174
https://bugs.webkit.org/show_bug.cgi?id=200916
https://bugs.chromium.org/p/chromium/issues/detail?id=993760

I need a way (eg CSS) to opt into precision (and out of snapping/rounding).

Is such a property in any of the existing W3C specs?

@tobireif
Copy link
Author

Mozilla says this:

"presumably there are some SVG images that render more crisply if snapped to integer pixel sizes"

"Not sure there is much to do here since we either snap or don't snap, with visual trade-offs in each depending on the circumstances."

In some cases snapping is better it seems, in some cases precision is required.

Thus it would be great if there'd be a W3C-sanctioned way of requesting precision respectively snapping/rounding. For example we could have precision: optimal and precision: rounded.

@dirkschulze
Copy link
Contributor

For SVG there is shape-rendering. It depends where you want to apply the precision... on the host of the SVG or within the SVG file? For the host it would probably be image-rendering

@tobireif
Copy link
Author

What to do eg for nested grids?

There sometimes are gaps when I resize this eg in Chrome:

https://tobireif.com/non_site_stuff/for_bug_report_grid_object_svg_gap/example_with_inline_svg_and_nested_grid.html

@tobireif
Copy link
Author

I need a way (eg CSS) to opt into precision (and out of snapping/rounding).

@tobireif
Copy link
Author

tobireif commented Jul 1, 2021

I still need a way (eg CSS) to opt into precision (and out of snapping/rounding).

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

No branches or pull requests

3 participants