background-336

background shorthand - two values

WeasyPrint

This browser

Flags
dom, script
Assertion
Check if two values are present, then the first sets 'background-origin' and the second 'background-clip'

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3     <title>CSS Backgrounds and Borders Test: background shorthand - two &lt;box&gt; values</title>
 4     <link href="http://www.intel.com" rel="author" title="Intel">
 5     <link href="http://www.w3.org/TR/css3-background/#the-background" rel="help">
 6     <meta content="dom" name="flags">
 7     <meta content="Check if two <box> values are present, then the first sets 'background-origin' and the second 'background-clip'" name="assert">
 8     <style>
 9         #test {
10             background: border-box padding-box;
11         }
12     </style>
13     <script src="/resources/testharness.js"></script>
14     <script src="/resources/testharnessreport.js"></script>
15   </head>
16   <body>
17     <div id="log"></div>
18     <div id="test"></div>
19     <script>
20         var cs = getComputedStyle(document.getElementById("test"), null);
21 
22         test(function() {
23             assert_equals(cs.getPropertyValue("background-origin"),
24                 "border-box", "background specified value for background-origin");
25         }, "background_specified_box_two_origin");
26 
27         test(function() {
28             assert_equals(cs.getPropertyValue("background-clip"),
29                 "padding-box", "background specified value for background-clip");
30         }, "background_specified_box_two_clip");
31     </script>
32   
33 
34 </body></html>