list-style-image-computed.sub.html (2425B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Lists: getComputedStyle().listStyleImage</title> 6 <link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-list-style-image"> 7 <meta name="assert" content="list-style-image 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 #target { 13 font-size: 40px; 14 } 15 </style> 16 </head> 17 <body> 18 <div id="target"></div> 19 <script> 20 test_computed_value('list-style-image', 'none'); 21 22 test_computed_value('list-style-image', 'url("https://{{host}}/")'); 23 24 test_computed_value('list-style-image', 'linear-gradient(to left bottom, red , blue )', 'linear-gradient(to left bottom, rgb(255, 0, 0), rgb(0, 0, 255))'); 25 test_computed_value('list-style-image', 'linear-gradient(calc(90deg - 45deg), rgb(0, 128, 0), rgb(0, 0, 255)', 'linear-gradient(45deg, rgb(0, 128, 0), rgb(0, 0, 255))'); 26 27 test_computed_value('list-style-image', 'radial-gradient(10px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))'); 28 test_computed_value('list-style-image', 'radial-gradient(circle calc(-0.5em + 10px) at calc(-1em + 10px) calc(-2em + 10px), rgb(255, 0, 0), rgb(0, 0, 255))', 'radial-gradient(0px at -30px -70px, rgb(255, 0, 0), rgb(0, 0, 255))'); 29 test_computed_value('list-style-image', 'radial-gradient(ellipse calc(-0.5em + 10px) calc(0.5em + 10px) at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))', 'radial-gradient(0px 30px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))'); 30 test_computed_value('list-style-image', 'radial-gradient(ellipse calc(0.5em + 10px) calc(-0.5em + 10px) at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))', 'radial-gradient(30px 0px at 20px 30px, rgb(255, 0, 0), rgb(0, 0, 255))'); 31 test_computed_value('list-style-image', 'radial-gradient(black 0% 0.5em, 25%, green 30% 60%, calc(100% * 3 / 4), white calc(100% - 20%) 100%', 'radial-gradient(rgb(0, 0, 0) 0%, rgb(0, 0, 0) 20px, 25%, rgb(0, 128, 0) 30%, rgb(0, 128, 0) 60%, 75%, rgb(255, 255, 255) 80%, rgb(255, 255, 255) 100%)'); 32 33 test_computed_value('list-style-image', 'conic-gradient(gold calc(100% / 2), #f06 calc(360deg * 4 / 5))', 'conic-gradient(rgb(255, 215, 0) 50%, rgb(255, 0, 102) 288deg)'); 34 test_computed_value('list-style-image', 'conic-gradient(black 1turn, white', 'conic-gradient(rgb(0, 0, 0) 360deg, rgb(255, 255, 255))'); 35 </script> 36 </body> 37 </html>