MCPcopy Create free account
hub / github.com/JsAaron/jQuery / computePixelPositionAndBoxSizingReliable

Function computePixelPositionAndBoxSizingReliable

2.1.1/src/css/support.js:28–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 // Executing both pixelPosition & boxSizingReliable tests require only one layout
27 // so they're executed at the same time to save the second computation.
28 function computePixelPositionAndBoxSizingReliable() {
29 div.style.cssText =
30 // Support: Firefox<29, Android 2.3
31 // Vendor-prefix box-sizing
32 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
33 "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
34 "border:1px;padding:1px;width:4px;position:absolute";
35 div.innerHTML = "";
36 docElem.appendChild( container );
37
38 var divStyle = window.getComputedStyle( div, null );
39 pixelPositionVal = divStyle.top !== "1%";
40 boxSizingReliableVal = divStyle.width === "4px";
41
42 docElem.removeChild( container );
43 }
44
45 // Support: node.js jsdom
46 // Don't assume that getComputedStyle is a property of the global object

Callers 1

support.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected