MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / computeStyleTests

Function computeStyleTests

libs/jquery-3.5.1/jquery-2.2.4.js:5705–5728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5703 // Executing both pixelPosition & boxSizingReliable tests require only one layout
5704 // so they're executed at the same time to save the second computation.
5705 function computeStyleTests() {
5706 div.style.cssText =
5707
5708 // Support: Firefox<29, Android 2.3
5709 // Vendor-prefix box-sizing
5710 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
5711 "position:relative;display:block;" +
5712 "margin:auto;border:1px;padding:1px;" +
5713 "top:1%;width:50%";
5714 div.innerHTML = "";
5715 documentElement.appendChild( container );
5716
5717 var divStyle = window.getComputedStyle( div );
5718 pixelPositionVal = divStyle.top !== "1%";
5719 reliableMarginLeftVal = divStyle.marginLeft === "2px";
5720 boxSizingReliableVal = divStyle.width === "4px";
5721
5722 // Support: Android 4.0 - 4.3 only
5723 // Some styles come back with percentage values, even though they shouldn't
5724 div.style.marginRight = "50%";
5725 pixelMarginRightVal = divStyle.marginRight === "4px";
5726
5727 documentElement.removeChild( container );
5728 }
5729
5730 jQuery.extend( support, {
5731 pixelPosition: function() {

Callers 1

jquery-2.2.4.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected