if ( jQuery.css ) { QUnit.module( "css", { teardown: moduleTeardown } ); QUnit.test( "css(String|Hash)", function( assert ) { assert.expect( 43 ); assert.equal( jQuery( "#qunit-fixture" ).css( "display" ), "block", "Check for css property \"display\"" ); var $child, div, div2, width, height, child, prctval, checkval, old; $child = jQuery( "#nothiddendivchild" ).css( { "width": "20%", "height": "20%" } ); assert.notEqual( $child.css( "width" ), "20px", "Retrieving a width percentage on the child of a hidden div returns percentage" ); assert.notEqual( $child.css( "height" ), "20px", "Retrieving a height percentage on the child of a hidden div returns percentage" ); div = jQuery( "
" ); // These should be "auto" (or some better value) // temporarily provide "0px" for backwards compat assert.equal( div.css( "width" ), "0px", "Width on disconnected node." ); assert.equal( div.css( "height" ), "0px", "Height on disconnected node." ); div.css( { "width": 4, "height": 4 } ); assert.equal( div.css( "width" ), "4px", "Width on disconnected node." ); assert.equal( div.css( "height" ), "4px", "Height on disconnected node." ); div2 = jQuery( "