Status: PASS | Duration: 77ms | Subtests: 20/20 | Open test on wpt.live | wpt.fyi
Data from commit:
96ff533 Remove hidden nodes from the acccessibility tree (#823) (2026-09-07)
| Subtest | Status | Message |
|---|---|---|
| Property stroke-width value '10' | PASS | |
| Property stroke-width value 'calc(10px + 0.5em)' | PASS | |
| Property stroke-width value 'calc(10px - 0.5em)' | PASS | |
| Property stroke-width value '40%' | PASS | |
| Property stroke-width value 'calc(50% + 60px)' | PASS | |
| stroke-width computes em lengths | PASS | |
| stroke-width computes ex lengths | PASS | |
| stroke-width computes ch lengths | PASS | |
| stroke-width computes rem lengths | PASS | |
| stroke-width computes vw lengths | PASS | |
| stroke-width computes vh lengths | PASS | |
| stroke-width computes vmin lengths | PASS | |
| stroke-width computes vmax lengths | PASS | |
| stroke-width computes cm lengths | PASS | |
| stroke-width computes mm lengths | PASS | |
| stroke-width computes Q lengths | PASS | |
| stroke-width computes in lengths | PASS | |
| stroke-width computes pt lengths | PASS | |
| stroke-width computes pc lengths | PASS | |
| stroke-width computes px lengths | PASS |
/svg/painting/parsing/stroke-width-computed.svg
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" width="800px" height="800px"> <title>SVG Painting: getComputedStyle().strokeWidth</title> <metadata> <h:link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/painting.html#StrokeWidth"/> <h:meta name="assert" content="stroke-width computed value is absolute length."/> </metadata> <g id="target"></g> <g id="ref"></g> <style> #target, #ref { font-size: 40px; } </style> <h:script src="/resources/testharness.js"/> <h:script src="/resources/testharnessreport.js"/> <h:script src="/css/support/computed-testcommon.js"/> <script><![CDATA[ test_computed_value("stroke-width", "10", "10px"); test_computed_value("stroke-width", "calc(10px + 0.5em)", "30px"); test_computed_value("stroke-width", "calc(10px - 0.5em)", "0px"); test_computed_value("stroke-width", "40%"); test_computed_value("stroke-width", "calc(50% + 60px)"); const lengthUnits = [ 'em', 'ex', 'ch', 'rem', 'vw', 'vh', 'vmin', 'vmax', 'cm', 'mm', 'Q', 'in', 'pt', 'pc', 'px' ]; for (let lengthUnit of lengthUnits) { const length = '987' + lengthUnit; test(() => { const target = document.getElementById('target'); target.style.strokeWidth = length; const ref = document.getElementById('ref'); ref.style.textIndent = length; assert_equals(getComputedStyle(target).strokeWidth, getComputedStyle(ref).textIndent); }, 'stroke-width computes ' + lengthUnit + ' lengths'); } ]]></script> </svg>