mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 02:44:58 -05:00
Support: Simplify the box-sizing test
Don't require body in the support.boxSizing test.
This commit is contained in:
@@ -171,7 +171,7 @@ function getWidthOrHeight( elem, name, extra ) {
|
||||
var valueIsBorderBox = true,
|
||||
val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
||||
styles = getStyles( elem ),
|
||||
isBorderBox = support.boxSizing() && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||
isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||
|
||||
// some non-html elements return undefined for offsetWidth, so check for null/undefined
|
||||
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
||||
@@ -366,7 +366,7 @@ jQuery.each([ "height", "width" ], function( i, name ) {
|
||||
elem,
|
||||
name,
|
||||
extra,
|
||||
support.boxSizing() && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
||||
support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
||||
styles
|
||||
) : 0
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user