New issue
Advanced search Search tips

Issue 644105 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Hairline gap when scaling down SVG for use as bg image

Project Member Reported by aerotwist@chromium.org, Sep 5 2016

Issue description

On Chrome on Android I've used SVGs as background images (which use viewBox and are scaled down to fit to their element) on https://developer.chrome.com/devsummit

As you can see from the attached screenshot there are hairline cracks where they adjoin the neighboring element, breaking the overall effect.

I've tried moving the element a little, adding borders, but I'm wondering if there's some kind of rounding error related to dPR when scaling down the SVG?
 
unnamed.png
279 KB View Download

Comment 1 by f...@opera.com, Sep 5 2016

Components: Blink>SVG
Some form of rounding error is not unlikely - what's the dPR in question?

Comment 2 by f...@opera.com, Sep 5 2016

Status: Available (was: Untriaged)
It's on a Nexus 5X, which reports a dPR of 2.625
This is almost certainly a pixel snapping issue with background images. It may not be SVG at all.
The issue is the sizing of the :after elements, or maybe the sizing of the divs, but the net effect is that the :after edges and the background image in the div do not line up exactly. If you look at the lower hairline you can see that the background image of the div is there in the hairline, so it's the :after that is too small or the div that is too big.

So it's conceivable that this is a layout problem.

Also, it doesn't repro on DevTools device emulation on desktop, but I do see it on Nexus5x.

Comment 6 by the.sp...@gmail.com, Feb 22 2017

I run into the same problem with a different layout: just absolute positioned SVGs on top of a coloured background. Here's a pen showing the problem: http://codepen.io/spite/full/dNEZyP/

It doesn't happen on chrome desktop (although i have reports of people getting the thin line by changing the zoom with pinch-zoom on OSX), but it does happen on Safari, Firefox (Win, OSX, Linux, Android) and Edge.

If it doesn't happen for a specific window size, resizing or generally changing the viewport shows that result.
Project Member

Comment 7 by sheriffbot@chromium.org, Mar 9 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: WontFix (was: Untriaged)
The page is gone, of course.

Out test for SVG having hairline cracks was fixed when I switched to painting to the border rect, so I think we might have fixed this one too. Regardless, not actionable now.

Sign in to add a comment