Skip to content

Instantly share code, notes, and snippets.

@rstacruz
Forked from anonymous/ie.md
Created December 17, 2012 09:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rstacruz/4316990 to your computer and use it in GitHub Desktop.
Save rstacruz/4316990 to your computer and use it in GitHub Desktop.
The IE cheatsheet

The IE cheatsheet

Only in IE7+

Selectors:

  • > (descendant)
  • [attr] (attribute)
  • .class1.class2 (multiple classes)
  • ~ (sibling)

CSS properties:

  • max-width
  • position: fixed

Only in IE8+

Selectors/pseudos:

  • + (adjacent)
  • :first-child (unless for static elements)
  • :focus
  • :before, :after (single colon only)

CSS properties:

  • outline
  • display: inline-block (unless on <span>)
  • display: table
  • whitespace: pre-wrap
  • whitespace: pre-line
  • border-collapse, border-spacing, table-layout, ...
  • box-sizing

Features:

  • PNG alpha transparency
  • data: URI

JS features:

  • JSON parsing
  • Cross-origin resource sharing

Only in IE9+

Selectors/pseudos:

  • :first-of-type, :last-of-type
  • :last-child
  • :empty
  • :enabled, :disabled, :checked
  • :not()
  • :nth-child(), :nth-last-child(),
  • :nth-of-type(), :nth-last-of-type(), :only-of-type()
  • :only-child()
  • :target
  • ::selection

CSS properties:

  • background-clip
  • background-origin
  • background-size
  • background: x, y, z (multiple backgrounds)
  • opacity
  • border-radius
  • box-shadow
  • rgba()
  • -ms-transform

CSS features:

  • @media queries

HTML5 features:

  • <canvas>
  • <svg>
  • <img src='image.svg'>

Only in IE10+

CSS features:

  • -ms-animation
  • transition
  • linear-gradient()

Features:

  • <input placeholder='..'>
  • <input type='range'>

HTML5 features:

  • Web sockets

Not in IE10 (or below) at all

CSS properties:

Polyfills

Always install these in every project:

You may also need these:

  • [modernizr] for feature detection
  • css3pie for CSS3 decorations

Also see:

Misc

  • "Static" = doesn't work for elements inserted via JS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment