Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /svg/geometry/parsing/width-attribute-valid.svg - WPT Dashboard Interop Dashboard
<?xml version="1.0" encoding="UTF-8"?>
width="800px" height="800px">
<title>SVG Geometry Properties: parsing the width 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 width presentation attribute supports '<length-percentage [0,inf]> | <number [0,inf]>'."/>
</metadata>
<rect 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("width", "0", 0);
test_valid_attribute_value("width", "5", 5);
test_valid_attribute_value("width", "5px", 5);
test_valid_attribute_value("width", "5%", 40, "40px");
]]></script>
</svg>