servo/tests/ref/image_rendering_pixelated_a.html
Patrick Walton 09c53f461d layout: Implement image-rendering per CSS-IMAGES-3 § 5.3 and
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.
2015-03-03 17:54:12 +01:00

20 lines
375 B
HTML

<!DOCTYPE html>
<html>
<head>
<!-- Tests that `image-rendering: pixelated` causes nearest-neighbor interpolation to be used. -->
<style>
img {
position: absolute;
top: 0;
left: 0;
image-rendering: -moz-crisp-edges; /* for testing in Firefox */
image-rendering: pixelated;
}
</style>
</head>
<body>
<img width=100 height=50 src=4x2.png>
</body>
</html>