column-rule-computed.html (1398B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Multi-column Layout: getComputedStyle().columnRule</title> 6 <link rel="help" href="https://drafts.csswg.org/css-multicol/#propdef-column-rule"> 7 <meta name="assert" content="column-rule computed value is as specified."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/computed-testcommon.js"></script> 11 <style> 12 #reference { 13 column-rule-style: dotted; /* Avoid column-rule-width computed style 0px */ 14 column-rule-width: medium; 15 } 16 #target { 17 color: lime; 18 } 19 </style> 20 </head> 21 <body> 22 <div id="reference"></div> 23 <div id="target"></div> 24 <script> 25 const currentColor = 'rgb(0, 255, 0)'; 26 const mediumWidth = getComputedStyle(document.getElementById('reference')).columnRuleWidth; // e.g. 3px 27 28 test_computed_value("column-rule", "10px", "10px " + currentColor); 29 test_computed_value("column-rule", "dotted", mediumWidth + " dotted " + currentColor); 30 test_computed_value("column-rule", "0px none rgb(255, 0, 255)", "0px rgb(255, 0, 255)"); 31 test_computed_value("column-rule", "10px dotted rgb(255, 0, 255)"); 32 33 test_computed_value("column-rule", "medium hidden currentcolor", mediumWidth + " hidden " + currentColor); 34 test_computed_value("column-rule", "medium solid currentcolor", mediumWidth + " solid " + currentColor); 35 </script> 36 </body> 37 </html>