+
+ var div = jQuery('#nothiddendiv'), child = jQuery('#nothiddendivchild');
+
+ equals( parseInt(div.css("fontSize")), 16, "Verify fontSize px set." );
+ equals( parseInt(div.css("font-size")), 16, "Verify fontSize px set." );
+ equals( parseInt(child.css("fontSize")), 16, "Verify fontSize px set." );
+ equals( parseInt(child.css("font-size")), 16, "Verify fontSize px set." );
+
+ child.css("height", "100%");
+ equals( child[0].style.height, "100%", "Make sure the height is being set correctly." );
+
+ child.attr("class", "em");
+ equals( parseInt(child.css("fontSize")), 32, "Verify fontSize em set." );
+
+ // Have to verify this as the result depends upon the browser's CSS
+ // support for font-size percentages
+ child.attr("class", "prct");
+ var prctval = parseInt(child.css("fontSize")), checkval = 0;
+ if ( prctval === 16 || prctval === 24 ) {
+ checkval = prctval;
+ }
+
+ equals( prctval, checkval, "Verify fontSize % set." );
+
+ equals( typeof child.css("width"), "string", "Make sure that a string width is returned from css('width')." );
+
+ var old = child[0].style.height;
+
+ // Test NaN
+ child.css("height", parseFloat("zoo"));
+ equals( child[0].style.height, old, "Make sure height isn't changed on NaN." );
+
+ // Test null
+ child.css("height", null);
+ equals( child[0].style.height, old, "Make sure height isn't changed on null." );
+
+ old = child[0].style.fontSize;
+
+ // Test NaN
+ child.css("font-size", parseFloat("zoo"));
+ equals( child[0].style.fontSize, old, "Make sure font-size isn't changed on NaN." );
+
+ // Test null
+ child.css("font-size", null);
+ equals( child[0].style.fontSize, old, "Make sure font-size isn't changed on null." );