CSS `image-rendering: pixelated;` works not as described in ~~docs~~
W3 states that using
pixelated
value of CSS image-rendering
property has effect only if image is upscaled. However, this is apparently not the case in Chromium and it does not work in Firefox too.
If the image is scaled down, it will be the same as auto — https://www.w3schools.com/cssref/css3_pr_image-rendering.php
2 Replies
don't trust w3schools, they're not related to the w3c so they're not "the docs" or anything official
there are many, many examples where w3schools is providing demonstrably wrong or incomplete info. MDN is much better, unless you want to read the actual specs from w3.org which are a bit dense and not necessarily always followed to the letter
mdn simply says this:
The image is scaled with the "nearest neighbor" or similar algorithm, preserving a "pixelated" look as the image changes in size.which seems much closer to your experience
Thanks!