Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/geometry/parsing/cy-attribute-valid.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="UTF-8"?>
width="800px" height="800px">
<title>SVG Geometry Properties: parsing the cy presentation attribute with valid values</title>
<metadata>
<h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/types.html#presentation-attribute-css-value"/>
<h:meta name="assert" content="the cy presentation attribute supports '<length-percentage> | <number>' (unlike the cy CSS property, which does not accept a bare number)."/>
</metadata>
<circle id="target"/>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<h:script src="support/attribute-testcommon.js"/>
<script><![CDATA[
test_valid_attribute_value("cy", "0", 0);
test_valid_attribute_value("cy", "5", 5);
test_valid_attribute_value("cy", "-10", -10);
test_valid_attribute_value("cy", "5px", 5);
test_valid_attribute_value("cy", "-10px", -10);
test_valid_attribute_value("cy", "5%", 40, "5%");
]]></script>
</svg>