1x1px background image isn't consistent to other browsers
Categories
(Core :: Graphics, defect)
Tracking
()
People
(Reporter: razzeee+mozilla, Unassigned)
Details
Attachments
(5 files)
Steps to reproduce:
I took a logo and made it 1px width and 1px height.
Actual results:
It seems like the icon get's resized and shows in one pixel, so I end up with a bunch of very very small icons in a grid.
Expected results:
All other browsers including firefox seem to average the colors in the image and just show the one pixel with that average color.
This seems to work in chromium, firefox and webkit.
| Reporter | ||
Comment 1•1 year ago
|
||
| Reporter | ||
Comment 2•1 year ago
|
||
Here's a more minimal version, in theory you can remove the border, but you might not see the element then.
<html>
<body>
<style>
.root {
background-image: url("org.mozilla.firefox.png");
background-size: 1px 1px;
width: 500px;
height: 500px;
border: 1px solid black;
}
</style>
<div class="root"></div>
</body>
</html>
You will also need the image in the same folder
Comment 3•1 year ago
|
||
Jamie, is this maybe something you could help with? Sorry for the noise, it's just a bit unfortunate as it apparently affects a new design role-out for https://flathub.org/ (even though I guess it should be possible to work around it) :/
Comment 4•1 year ago
|
||
Could you please attach screenshots of what it's supposed to look like and what it actually looks like? I think I see your "expected results" (solid colour) when at the default zoom on Firefox on Android, Firefox on Macos, and Chrome on Macos. And see your "actual results" (lots of icons) on Chrome on Android. In all browsers on all platforms I see lots of icons once zoomed in.
What device are you testing this on? Could you please attach the about:support information to the bug. Thanks!
| Reporter | ||
Comment 5•1 year ago
|
||
| Reporter | ||
Comment 6•1 year ago
|
||
| Reporter | ||
Comment 7•1 year ago
|
||
| Reporter | ||
Comment 8•1 year ago
|
||
| Reporter | ||
Comment 9•1 year ago
|
||
| Reporter | ||
Comment 10•1 year ago
|
||
Sorry, the upload was erroring and didn't show in the issue.
I think you are unfortunately right about the zoom level affecting this - meaning I can reproduce that with firefox
Just in case
about:device
https://paste.kodi.tv/gorovutoje
Comment 11•1 year ago
|
||
The severity field is not set for this bug.
:amejia, could you have a look please?
For more information, please visit BugBot documentation.
Comment 12•1 year ago
|
||
This looks like the behavior is the same between Android and Desktop, Android loads with a different zoom level which makes it look different initially. Is this a bug?
| Reporter | ||
Comment 13•1 year ago
|
||
(In reply to Jeff Boek [:boek] from comment #12)
This looks like the behavior is the same between Android and Desktop, Android loads with a different zoom level which makes it look different initially. Is this a bug?
Yes, but take it with a grain of salt, when creating the original issue, I was not aware, how zoom levels affect this, even in different browsers. There is also a webkit bug related to this, but it's slightly worse on that engine.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•