Skip to content

Instantly share code, notes, and snippets.

Last active May 19, 2017 08:01
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Test transform-style: preserve-3d support
function testPreserve3DSupport() {
const element = document.createElement('p');
document.body.insertBefore(element, null);
const propName = 'transform-style';[propName] = 'preserve-3d';
const propValue = window.getComputedStyle(element, null).getPropertyValue(propName);
return (propValue === 'preserve-3d');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment