counter-set-computed.html (1300B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Lists: getComputedStyle().counterSet</title> 6 <link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set"> 7 <meta name="assert" content="tests that counter-set grammar is supported."> 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 #container { 13 container-type: inline-size; 14 width: 100px; 15 } 16 </style> 17 </head> 18 <body> 19 <div id="container"> 20 <div id="target"></div> 21 </div> 22 <script> 23 test_computed_value('counter-set', 'none'); 24 test_computed_value('counter-set', 'myCounter', 'myCounter 0'); 25 test_computed_value('counter-set', 'myCounter 5'); 26 test_computed_value('counter-set', 'myCounter 7 otherCounter 8'); 27 test_computed_value('counter-set', 'myCounter otherCounter 8', 'myCounter 0 otherCounter 8'); 28 test_computed_value('counter-set', 'myCounter 7 otherCounter', 'myCounter 7 otherCounter 0'); 29 test_computed_value('counter-set', 'myCounter calc(10 + (sign(2cqw - 10px) * 5))', 'myCounter 5'); 30 test_computed_value('counter-set', 'myCounter calc(10 + (sign(2cqw - 10px) * 5)) otherCounter calc(15 + (sign(2cqw - 10px) * 5))', 'myCounter 5 otherCounter 10'); 31 </script> 32 </body> 33 </html>