aboutsummaryrefslogtreecommitdiffstats
path: root/src/support.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-04-06 08:39:59 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-04-06 08:39:59 -0400
commit5376a809c0d2bee4b7872847c2821e458dfdcc3b (patch)
tree68d946672ff75b80d88c70dea711e4a805e7036b /src/support.js
parent77536f5cb2ab042ac8be40ba59f36d8f3bd7e4d1 (diff)
downloadjquery-5376a809c0d2bee4b7872847c2821e458dfdcc3b.tar.gz
jquery-5376a809c0d2bee4b7872847c2821e458dfdcc3b.zip
Fix #10413, #10679. Fix box-sizing:border-box and add css vendor prefix support.
Diffstat (limited to 'src/support.js')
-rw-r--r--src/support.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/support.js b/src/support.js
index 5a0d1b731..ccf9d4315 100644
--- a/src/support.js
+++ b/src/support.js
@@ -180,6 +180,7 @@ jQuery.support = (function() {
jQuery(function() {
var container, offsetSupport, marginDiv,
conMarginTop = 1,
+ boxSizingPrefixes = [ "", "-moz-", "-webkit-", "" ],
body = document.getElementsByTagName("body")[0];
if ( !body ) {
@@ -250,6 +251,9 @@ jQuery.support = (function() {
support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
}
+ div.style.cssText = boxSizingPrefixes.join("box-sizing:border-box;") + "width:4px;padding:1px;border:1px;display:block";
+ support.boxSizing = ( div.offsetWidth === 4 );
+
offsetSupport = {
doesNotIncludeMarginInBodyOffset: ( body.offsetTop !== conMarginTop )
};