background-clip-006

background-clip - inherit keyword value

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
Background-clip with 'inherit' implies to inherit its parent element value to paint the background area.

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3     <meta charset="utf-8">
 4     <title>CSS Backgrounds and Borders Test: background-clip - inherit 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     <link href="http://www.w3.org/TR/css3-background/#value-types" rel="help" title="2.2. Value Types">
10     <!--
11     "
12     all properties defined in this specification also accept
13     the inherit keyword as their property value
14     "
15     CSS Backgrounds and Borders Module Level 3
16     2.2. Value Types
17     http://www.w3.org/TR/css3-background/#value-types
18     -->
19     <meta content="" name="flags">
20     <meta content="Background-clip with 'inherit' implies to inherit its parent element value to paint the background area." name="assert">
21     <style>
22         #container {
23             background-clip: content-box;
24         }
25         #test-overlapped-red {
26             background-clip: inherit;
27             background-color: red;
28             border: transparent dotted 5px;
29             height: 100px;
30             padding: 25px;
31             width: 100px;
32         }
33         #ref-overlapping-green {
34             background-color: green;
35             bottom: 130px;
36             height: 100px;
37             left: 30px;
38             position: relative;
39             width: 100px;
40         }
41     </style>
42   </head>
43   <body>
44     <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
45     <div id="container">
46       <div id="test-overlapped-red"></div>
47       <div id="ref-overlapping-green"></div>
48     </div>
49   
50 
51 </body></html>