transform-with-sign-function.html (2143B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/css-values-4/#sign-funcs"> 3 <link rel="author" title="sakhapov@chromuim.org"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="../support/numeric-testcommon.js"></script> 7 <style> 8 #target { 9 font-size: 10px; 10 } 11 </style> 12 <div id="target"></div> 13 <script> 14 15 test_math_used('skew(calc(sign(1em - 1px) * 2deg), calc(sign(1em - 1px) * 2deg))', 'skew(2deg, 2deg)', {prop:'transform'}); 16 test_math_used('skewX(calc(sign(1em - 1px) * 2deg))', 'skewX(2deg)', {prop:'transform'}); 17 test_math_used('skewY(calc(sign(1em - 1px) * 2deg))', 'skewY(2deg)', {prop:'transform'}); 18 test_math_used('matrix(calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2))', 'matrix(2, 2, 2, 2, 2, 2)', {prop:'transform'}); 19 test_math_used('matrix3d(calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2),calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2), calc(sign(1em - 1px) * 2))', 'matrix3d(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2)', {prop:'transform'}); 20 test_math_used('rotate(calc(sign(1em - 1px) * 2deg))', 'rotate(2deg)', {prop:'transform'}); 21 test_math_used('rotateX(calc(sign(1em - 1px) * 2deg))', 'rotateX(2deg)', {prop:'transform'}); 22 test_math_used('rotateY(calc(sign(1em - 1px) * 2deg))', 'rotateY(2deg)', {prop:'transform'}); 23 test_math_used('rotateZ(calc(sign(1em - 1px) * 2deg))', 'rotateZ(2deg)', {prop:'transform'}); 24 test_math_used('calc(sign(1em - 1px) * 2) calc(sign(1em - 1px) * 2) calc(sign(1em - 1px) * 2)', '2 2 2', {prop:'scale'}); 25 test_math_used('calc(sign(1em - 1px) * 2) calc(sign(1em - 1px) * 2) calc(sign(1em - 1px) * 2) calc(sign(1em - 1px) * 2deg)', '2 2 2 2deg', {prop:'rotate'}); 26 27 </script>