1
1
module ( "css" ) ;
2
2
3
3
test ( "css(String|Hash)" , function ( ) {
4
- expect ( 42 ) ;
4
+ expect ( 41 ) ;
5
5
6
6
equals ( jQuery ( '#main' ) . css ( "display" ) , 'block' , 'Check for css property "display"' ) ;
7
7
@@ -13,21 +13,19 @@ test("css(String|Hash)", function() {
13
13
14
14
var div = jQuery ( "<div>" ) ;
15
15
16
- equals ( div . css ( "width" ) , "0px " , "Width on disconnected node." ) ;
17
- equals ( div . css ( "height" ) , "0px " , "Height on disconnected node." ) ;
16
+ equals ( div . css ( "width" ) || "auto" , "auto " , "Width on disconnected node." ) ;
17
+ equals ( div . css ( "height" ) || "auto" , "auto " , "Height on disconnected node." ) ;
18
18
19
19
div . css ( { width : 4 , height : 4 } ) ;
20
20
21
21
equals ( div . css ( "width" ) , "4px" , "Width on disconnected node." ) ;
22
22
equals ( div . css ( "height" ) , "4px" , "Height on disconnected node." ) ;
23
23
24
- var div2 = jQuery ( "<div style='display:none;'><input type='text'/><textarea/ ></div>" ) . appendTo ( "body" ) ;
24
+ var div2 = jQuery ( "<div style='display:none;'><input type='text' style='height:20px;' /><textarea style='height:20px;'/><div style='height:20px;'></div ></div>" ) . appendTo ( "body" ) ;
25
25
26
- equals ( div2 . find ( "input" ) . css ( "width" ) , "0px" , "Width on hidden input." ) ;
27
- equals ( div2 . find ( "input" ) . css ( "height" ) , "0px" , "Height on hidden input." ) ;
28
-
29
- equals ( div2 . find ( "textarea" ) . css ( "width" ) , "0px" , "Width on hidden textarea." ) ;
30
- equals ( div2 . find ( "textarea" ) . css ( "height" ) , "0px" , "Height on hidden textarea." ) ;
26
+ equals ( div2 . find ( "input" ) . css ( "height" ) , "20px" , "Height on hidden input." ) ;
27
+ equals ( div2 . find ( "textarea" ) . css ( "height" ) , "20px" , "Height on hidden textarea." ) ;
28
+ equals ( div2 . find ( "div" ) . css ( "height" ) , "20px" , "Height on hidden textarea." ) ;
31
29
32
30
div2 . remove ( ) ;
33
31
0 commit comments