@ -28,7 +28,7 @@
// ========================= getStyleProperty by kangax ===============================
// ========================= getStyleProperty by kangax ===============================
// http://perfectionkills.com/feature-testing-css-properties/
// http://perfectionkills.com/feature-testing-css-properties/
var prefixes = 'Moz Webkit O M s' . split ( ' ' ) ;
var prefixes = 'Moz Webkit O m s' . split ( ' ' ) ;
var getStyleProperty = function ( propName ) {
var getStyleProperty = function ( propName ) {
var style = document . documentElement . style ,
var style = document . documentElement . style ,
@ -82,21 +82,16 @@
} ,
} ,
csstransforms3d : function ( ) {
csstransforms3d : function ( ) {
var test = ! ! getStyleProperty ( 'perspective' ) ;
var ret = ! ! getStyleProperty ( 'perspective' ) , $style , $div ;
// double check for Chrome's false positive
if ( ret && 'webkitPerspective' in document . documentElement . style ) {
if ( test ) {
$style = $ ( '<style>@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}</style>' ) . appendTo ( 'head' ) ,
var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- ' . split ( ' ' ) ,
$div = $ ( '<div id="modernizr" />' ) . appendTo ( 'body' ) ;
mediaQuery = '@media (' + vendorCSSPrefixes . join ( 'transform-3d),(' ) + 'modernizr)' ,
ret = $div [ 0 ] . offsetLeft === 9 && $div [ 0 ] . offsetHeight === 3 ;
$style = $ ( '<style>' + mediaQuery + '{#modernizr{height:3px}}' + '</style>' )
. appendTo ( 'head' ) ,
$div = $ ( '<div id="modernizr" />' ) . appendTo ( 'html' ) ;
test = $div . height ( ) === 3 ;
$div . remove ( ) ;
$div . remove ( ) ;
$style . remove ( ) ;
$style . remove ( ) ;
}
}
return tes t;
return ret ;
} ,
} ,
csstransitions : function ( ) {
csstransitions : function ( ) {