Limited supportUseful when crisp-edges helps structure space, flow, or sizing without relying on brittle manual adjustments.

Overview

The image-rendering: crisp-edges CSS declaration scales images to preserve lines without blurring.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
css.properties.image-rendering.crisp-edges
13
79
65
7
18
7
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Compatibility
  • Available with a vendor prefix: -moz- (3.6)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: -webkit-optimize-contrast (6)
Notes 1 item(s)
Implementation note
  • Previously available under a different name: -webkit-optimize-contrast (6)

Syntax

CSS
.pixel-art {
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  width: 256px;
  height: 256px;
}

Live demo

crisp-edges

CSS Crisp-edges demo.

PreviewFullscreen

pixelated

CSS Pixelated demo.

PreviewFullscreen

Auto (default)

CSS Auto (default) demo.

PreviewFullscreen

Use cases

  • Component layout

    Use crisp-edges to create more predictable spacing and placement inside reusable UI patterns.

  • Responsive structure

    Adapt containers and flow rules so layouts stay stable across viewport changes.

Cautions

  • Test layout rules with real content, long labels, and small screens before depending on them broadly.
  • Prefer simpler layout primitives if they already solve the problem clearly.

Accessibility

  • Layout choices should preserve reading order and support zoom without clipping.
  • Avoid visually clever positioning that makes content harder to follow with keyboard or assistive tools.

Powered by web-features