Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/layout/svg-negative-viewbox.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>svg viewbox negative sizes</title>
<meta name="assert" content="The svg element should not have an aspect ratio in this state especially when viewbox widht -1, height -2">
<link rel="match" href="../../css/reference/ref-filled-green-300px-square.html">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width: 300px; background: red">
<svg viewBox="0 0 -1 -2" style="display: block; height: 300px; background: green"></svg>
</div>