The website of Ura Design
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
924 B

// display: table and table-cell test. (both are tested under one name "table-cell" )
// By @scottjehl
// all additional table display values are here: http://pastebin.com/Gk9PeVaQ though Scott has seen some IE false positives with that sort of weak detection.
// more testing neccessary perhaps.
Modernizr.addTest( "display-table",function(){
var doc = window.document,
docElem = doc.documentElement,
parent = doc.createElement( "div" ),
child = doc.createElement( "div" ),
childb = doc.createElement( "div" ),
ret;
parent.style.cssText = "display: table";
child.style.cssText = childb.style.cssText = "display: table-cell; padding: 10px";
parent.appendChild( child );
parent.appendChild( childb );
docElem.insertBefore( parent, docElem.firstChild );
ret = child.offsetLeft < childb.offsetLeft;
docElem.removeChild(parent);
return ret;
});