registered-property-value-018.https.html (1378B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <title>Values of lists reach worklet</title> 4 <link rel="help" href="https://drafts.css-houdini.org/css-paint-api/"> 5 <link rel="match" href="parse-input-arguments-ref.html"> 6 <script src="/common/reftest-wait.js"></script> 7 <script src="/common/worklet-reftest.js"></script> 8 <script src="./resources/utils.js"></script> 9 <body> 10 <div id="target"></div> 11 <script> 12 try { 13 CSS.registerProperty({ 14 name: '--prop-1', 15 syntax: '<length>+ | none', 16 initialValue: 'none', 17 inherits: false 18 }); 19 20 CSS.registerProperty({ 21 name: '--prop-2', 22 syntax: '<length># | none', 23 initialValue: 'none', 24 inherits: false 25 }); 26 27 CSS.registerProperty({ 28 name: '--prop-3', 29 syntax: '<length># | none', 30 initialValue: 'none', 31 inherits: false 32 }); 33 34 target.style.setProperty('--prop-1', '8px 16px'); 35 target.style.setProperty('--prop-2', '8px, 16px'); 36 target.style.setProperty('--prop-3', '8px'); 37 38 expectWorkletValues(target, { 39 '--prop-1': ['[CSSUnitValue 8px]', '[CSSUnitValue 16px]'], 40 '--prop-2': ['[CSSUnitValue 8px]', '[CSSUnitValue 16px]'], 41 '--prop-3': ['[CSSUnitValue 8px]'], 42 }); 43 } catch(e) { 44 document.body.textContent = e; 45 takeScreenshot(); 46 } 47 </script> 48 </body> 49 </html>