Skip to content

Instantly share code, notes, and snippets.

@tombennet
tombennet / preserve-pixelation.scss
Last active February 6, 2022 00:06
Preserve pixelation when scaling pixel art with CSS - https://builtvisible.com/image-scaling-in-css/
@mixin pixelated {
-ms-interpolation-mode: nearest-neighbor; // IE 7+ (non-standard property)
image-rendering: -webkit-crisp-edges; // Safari 6 - 9
image-rendering: -moz-crisp-edges; // Firefox 3.6 - 64
image-rendering: crisp-edges; // Firefox 65+
image-rendering: pixelated; // Chrome 41+, Edge 76+, Safari 10+
}
@tombennet
tombennet / Wordpress RSS 2.0 featured image enclosure.php
Last active February 27, 2020 10:35 — forked from DaveyJake/wp-rss2-image-enclosure.php
How to add an enclosure to a WordPress RSS feed using the featured image of the post - add to functions.php