background-334

background shorthand - background-size '100% auto'

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Flags
image
Assertion
Background-size with '100% auto' implies to rescale the image horizontally so that it fills the background area width and to rescale the image vertically so that it fills the background area height.

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3     <meta charset="utf-8">
 4     <title>CSS Backgrounds and Borders Test: background shorthand - background-size '100% auto'</title>
 5     <link href="http://www.intel.com" rel="author" title="Intel">
 6     <link href="http://www.w3.org/TR/css3-background/#the-background" rel="help" title="3.10. Backgrounds Shorthand: the 'background' property">
 7     <link href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" rel="reviewer" title="Gérard Talbot"> <!-- 2012-11-09 -->
 8     <!--
 9     http://www.gtalbot.org/BrowserBugsSection/review/background-334-review.html
10     -->
11     <link href="reference/background-334-ref.htm" rel="match">
12     <meta content="image" name="flags">
13     <meta content="Background-size with '100% auto' implies to rescale the image horizontally so that it fills the background area width and to rescale the image vertically so that it fills the background area height." name="assert">
14     <style>
15         #ref {
16             background-color: red;
17             height: 160px;
18             width: 160px;
19         }
20         #test {
21             background: #CCC url(support/60x60-green.png) top left / 100% auto no-repeat;
22             border: black dotted 5px;
23             bottom: 160px;
24             height: 100px;
25             padding: 25px;
26             position: relative;
27             width: 100px;
28         }
29     </style>
30   </head>
31   <body>
32     <p>Test passes if there is a filled green square with gray background, black dotted borders and <strong>no red</strong>.</p>
33     <div id="ref"></div>
34     <div id="test"></div>
35   
36 
37 </body></html>