background-clip-005

background-clip - content-box keyword value

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
Background-clip with 'content-box' implies to paint the background within (clipped to) the content box.

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3     <meta charset="utf-8">
 4     <title>CSS Backgrounds and Borders Test: background-clip - content-box keyword value</title>
 5     <link href="http://www.intel.com" rel="author" title="Intel">
 6     <link href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" rel="reviewer" title="Gérard Talbot"> <!-- 2012-11-09 -->
 7     <link href="http://www.w3.org/TR/css3-background/#the-background-clip" rel="help" title="3.7. Painting Area: the 'background-clip' property">
 8     <link href="reference/background-clip-005-ref.htm" rel="match">
 9     <meta content="" name="flags">
10     <meta content="Background-clip with 'content-box' implies to paint the background within (clipped to) the content box." name="assert">
11     <style>
12         #test-overlapped-red {
13             background-clip: content-box;
14             background-color: red;
15             border: transparent dotted 5px;
16             height: 100px;
17             padding: 25px;
18             width: 100px;
19         }
20         #ref-overlapping-green {
21             background-color: green;
22             bottom: 130px;
23             height: 100px;
24             left: 30px;
25             position: relative;
26             width: 100px;
27         }
28     </style>
29   </head>
30   <body>
31     <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
32     <div id="test-overlapped-red"></div>
33     <div id="ref-overlapping-green"></div>
34   
35 
36 </body></html>