Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Reference: preserveAspectRatio none on an image element stretches a referenced SVG that has only a viewBox</title>
<link rel="author" title="Sam Weinig" href="mailto:sam@webkit.org">
<style>
body { margin: 0; }
</style>
<svg width="220" height="120">
<rect x="10" y="10" width="100" height="100" fill="rgb(0,0,255)"/>
<rect x="110" y="10" width="100" height="100" fill="rgb(0,128,0)"/>
</svg>