Skip to content

Commit

Permalink
Tweaked csstransforms3d style test numbers to work around rounding bu…
Browse files Browse the repository at this point in the history
…g in Chrome 23.0 when zoomed (#760)
  • Loading branch information
stucox committed Dec 30, 2012
1 parent 4dee9d5 commit 535adf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feature-detects/css-transforms3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Modernizr.addTest('csstransforms3d', function() {
// Webkit allows this media query to succeed only if the feature is enabled.
// `@media (transform-3d),(-webkit-transform-3d){ ... }`
// If loaded inside the body tag and the test element inherits any padding, margin or borders it will fail #740
Modernizr.testStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;margin:0;padding:0;border:0}}', function( node, rule ) {
ret = node.offsetLeft === 9 && node.offsetHeight === 3;
Modernizr.testStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0}}', function( node, rule ) {
ret = node.offsetLeft === 9 && node.offsetHeight === 5;
});
}
return ret;
Expand Down

0 comments on commit 535adf8

Please sign in to comment.