Skip to content

Instantly share code, notes, and snippets.

@anthonyshort
Created October 28, 2012 05:15
Show Gist options
  • Save anthonyshort/3967688 to your computer and use it in GitHub Desktop.
Save anthonyshort/3967688 to your computer and use it in GitHub Desktop.
Image rendering mixins
// Sharpen an image if it has become blurry due to upscaling or downscaling
// https://developer.mozilla.org/en/CSS/image-rendering
@mixin sharpen-image
image-rendering:-moz-crisp-edges
// When photos are upscaled or downscaled, they often get blurry. Don't use
// this on flat color images, they will still appear blurry.
// https://developer.mozilla.org/en/CSS/image-rendering
@mixin high-quality-image
image-rendering:optimizeQuality
// Optimizes the rendering on images so they
// appear faster, but at a lower quality. Useful for <video>
@mixin low-quality-image
image-rendering:optimizeSpeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment