Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

3d transforms. only do the media query check for webkit. fixes #133

  • Loading branch information...
commit 6ba742c0e0bd1d98de74aa9b643dc7ffeff1a939 1 parent 7e2703b
@paulirish paulirish authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 modernizr.js
View
8 modernizr.js
@@ -558,10 +558,10 @@ window.Modernizr = (function(window,document,undefined){
var ret = !!test_props([ 'perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective' ]);
// Webkit’s 3D transforms are passed off to the browser's own graphics renderer.
- // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome (yet?).
- // As a result, Webkit typically recognizes the syntax but will sometimes throw a false
- // positive, thus we must do a more thorough check:
- if (ret){
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+ // some conditions. As a result, Webkit typically recognizes the syntax but
+ // will sometimes throw a false positive, thus we must do a more thorough check:
+ if (ret && 'webkitPerspective' in docElement.style){
// Webkit allows this media query to succeed only if the feature is enabled.
// "@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){ ... }"
Please sign in to comment.
Something went wrong with that request. Please try again.