background-intrinsic-001.xht (1918B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Background Intrinsic Sizes: No intrinsic size</title> 5 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties" /> 7 <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size"/> 8 <link rel="match" href="background-intrinsic-ref.xht"/> 9 <meta name="flags" content="svg" /> 10 <meta name="assert" content="A background image with no intrinsic size covers 11 the entire padding box." /> 12 <style type="text/css"> 13 /* Setup. Use 5:6 ratio because it's weird and unlikely to be hard-coded anywhere. */ 14 div { 15 position: relative; 16 } 17 .cover, .limit { 18 width: 120px; 19 height: 120px; 20 margin: 0.5em; 21 background: green; /* Used to match reference; remove for debugging. */ 22 } 23 .control { 24 position: absolute; 25 top: 10px; bottom: 10px; 26 left: 10px; right: 30px; 27 } 28 .cover .control { 29 background: red; 30 } 31 .limit .control { 32 background: green; 33 } 34 .test { 35 /* 80x100 bgpos area */ 36 height: 80px; 37 width: 60px; 38 padding: 10px; 39 /* 100 x 120 bgpaint area */ 40 border: 10px solid transparent; 41 } 42 43 /* Test */ 44 .cover .test { 45 background: no-repeat url(support/green-intrinsic-none.svg); 46 } 47 .limit .test { 48 background: no-repeat url(support/red-intrinsic-none.svg); 49 } 50 </style> 51 </head> 52 <body> 53 <p>There must be two green boxes below and no red.</p> 54 55 <div class="cover"> 56 <div class="control"></div> 57 <div class="test"></div> 58 </div> 59 60 <div class="limit"> 61 <div class="test"></div> 62 <div class="control"></div> 63 </div> 64 65 </body> 66 </html>