Skip to content

Instantly share code, notes, and snippets.

@marcamos
Last active December 31, 2015 18:29
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcamos/8027172 to your computer and use it in GitHub Desktop.
Save marcamos/8027172 to your computer and use it in GitHub Desktop.
* modernizr-classes-ie.markdown: A list of classes added to each version of IE, via Modernizr. * report-filtered-classes.js: If pre-defined classes *are* found on the HTML element (from Modernizr), log them to the console. You can do something entirely different, such as prepending a list of the found classes to the body element (for example).

Classes inserted into IE by Modernizr

Updated December 23rd, 2013: These lists were gathered from a Windows 7 virtual machine on a MacBook Pro.

IE11

  • js
  • flexbox
  • canvas
  • canvastext
  • webgl
  • no-touch
  • geolocation
  • postmessage
  • no-websqldatabase
  • indexeddb
  • hashchange
  • history
  • draganddrop
  • websockets
  • rgba
  • hsla
  • multiplebgs
  • backgroundsize
  • borderimage
  • borderradius
  • boxshadow
  • textshadow
  • opacity
  • cssanimations
  • csscolumns
  • cssgradients
  • no-cssreflections
  • csstransforms
  • csstransforms3d
  • csstransitions
  • fontface
  • generatedcontent
  • video
  • audio
  • localstorage
  • sessionstorage
  • webworkers
  • applicationcache
  • svg
  • inlinesvg
  • no-smil
  • svgclippaths

IE10

  • js
  • flexbox
  • canvas
  • canvastext
  • no-webgl
  • no-touch
  • geolocation
  • postmessage
  • no-websqldatabase
  • indexeddb
  • hashchange
  • history
  • draganddrop
  • websockets
  • rgba
  • hsla
  • multiplebgs
  • backgroundsize
  • no-borderimage
  • borderradius
  • boxshadow
  • textshadow
  • opacity
  • cssanimations
  • csscolumns
  • cssgradients
  • no-cssreflections
  • csstransforms
  • csstransforms3d
  • csstransitions
  • fontface
  • generatedcontent
  • video
  • audio
  • localstorage
  • sessionstorage
  • webworkers
  • applicationcache
  • svg
  • inlinesvg
  • no-smil
  • svgclippaths

IE9

  • js
  • no-flexbox
  • canvas
  • canvastext
  • no-webgl
  • no-touch
  • geolocation
  • postmessage
  • no-websqldatabase
  • no-indexeddb
  • hashchange
  • no-history
  • draganddrop
  • no-websockets
  • rgba
  • hsla
  • multiplebgs
  • backgroundsize
  • no-borderimage
  • borderradius
  • boxshadow
  • no-textshadow
  • opacity
  • no-cssanimations
  • no-csscolumns
  • no-cssgradients
  • no-cssreflections
  • csstransforms
  • no-csstransforms3d
  • no-csstransitions
  • fontface
  • generatedcontent
  • video
  • audio
  • localstorage
  • sessionstorage
  • no-webworkers
  • no-applicationcache
  • svg
  • inlinesvg
  • no-smil
  • svgclippaths

IE8

  • js
  • no-flexbox
  • no-canvas
  • no-canvastext
  • no-webgl
  • no-touch
  • no-geolocation
  • postmessage
  • no-websqldatabase
  • no-indexeddb
  • hashchange
  • no-history
  • draganddrop
  • no-websockets
  • no-rgba
  • no-hsla
  • no-multiplebgs
  • no-backgroundsize
  • no-borderimage
  • no-borderradius
  • no-boxshadow
  • no-textshadow
  • no-opacity
  • no-cssanimations
  • no-csscolumns
  • no-cssgradients
  • no-cssreflections
  • no-csstransforms
  • no-csstransforms3d
  • no-csstransitions
  • fontface
  • generatedcontent
  • no-video
  • no-audio
  • localstorage
  • sessionstorage
  • no-webworkers
  • no-applicationcache
  • no-svg
  • no-inlinesvg
  • no-smil
  • no-svgclippaths

IE7

  • js
  • no-flexbox
  • no-canvas
  • no-canvastext
  • no-webgl
  • no-touch
  • no-geolocation
  • postmessage
  • no-websqldatabase
  • no-indexeddb
  • no-hashchange
  • no-history
  • draganddrop
  • no-websockets
  • no-rgba
  • no-hsla
  • no-multiplebgs
  • no-backgroundsize
  • no-borderimage
  • no-borderradius
  • no-boxshadow
  • no-textshadow
  • no-opacity
  • no-cssanimations
  • no-csscolumns
  • no-cssgradients
  • no-cssreflections
  • no-csstransforms
  • no-csstransforms3d
  • no-csstransitions
  • fontface
  • no-generatedcontent
  • no-video
  • no-audio
  • localstorage
  • sessionstorage
  • no-webworkers
  • no-applicationcache
  • no-svg
  • no-inlinesvg
  • no-smil
  • no-svgclippaths
// If pre-defined classes *are* found on the HTML element (from Modernizr), log them
// to the console. You can do something entirely different, such as prepending a list
// of the found classes to the body element (for example).
var featureTest = [
'no-rgba',
'no-backgroundsize',
'no-opacity',
'no-cssanimations',
'no-cssgradients',
'no-csstransforms',
'no-csstransitions',
'no-fontface',
'no-generatedcontent',
'no-svg',
'no-inlinesvg'
];
// For each class in the above array...
$.each(featureTest, function(index, value){
// ...if that class exists on the HTML element (from Modernizr)...
if ($('html').hasClass(value)) {
// ...say so in the console.
console.log(value + ' reported');
}
});
@kevinruscoe
Copy link

Thanks for this. Good work.

@marcamos
Copy link
Author

My pleasure, thanks for the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment