<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Nested Weird SVG Test</title>
<style>
body {
background: #222;
color: #eee;
font-family: monospace, monospace;
padding: 2rem;
}
svg {
border: 1px solid #666;
background: #111;
margin: 1rem 0;
display: block;
}
</style>
</head>
<body>
<h1>Nested Weird SVG Test</h1>
<p>Multiple independent weird SVGs nested inside one another with weird units, missing viewBoxes, and funky dimensions.</p>
<svg width="400pt" height="300px" style="background:#222;" viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
<title>Main container SVG</title>
<!-- Weird SVG #1: no viewBox, dimensions in mm -->
<svg width="50mm" height="40mm" x="10" y="20" style="fill:#0f0;">
<rect x="5" y="5" width="40" height="30" fill="limegreen" />
<text x="10" y="35" font-size="6pt" fill="#000">SVG#1: 50mm × 40mm, no viewBox</text>
</svg>
<!-- Weird SVG #2: has viewBox missing width/height attributes, uses em units -->
<svg x="120" y="10" viewBox="0 0 100 50" style="fill:#f09;" font-size="1.2em">
<circle cx="50" cy="25" r="20" fill="violet" />
<text x="10" y="40" fill="#222">SVG#2: no width/height, viewBox set, em units</text>
</svg>
<!-- Weird SVG #3: percentage width and height, viewBox partially wrong -->
<svg width="30%" height="60%" viewBox="0 0 40" style="stroke:#0ff; stroke-width:2px; fill:none;" >
<polyline points="0,40 20,0 40,40" />
<text x="0" y="38" font-size="8px" fill="#0ff">SVG#3: 30% x 60%, incomplete viewBox</text>
</svg>
<!-- Nested SVG #4 inside SVG #1 -->
<svg x="60" y="45" width="2in" height="1in" viewBox="0 0 200 100" style="background:#333; fill:#ff0;">
<ellipse cx="100" cy="50" rx="80" ry="40" />
<text x="20" y="55" font-family="Arial" font-size="10" fill="#000">SVG#4 nested inside SVG#1</text>
<!-- Deep nested SVG #5 inside SVG #4 with missing width/height and unusual units -->
<svg x="10cm" y="2cm" fill="orange" font-size="xx-large" viewBox="0 0 150 70" >
<rect x="5" y="5" width="140" height="60" rx="15" ry="15" stroke="orange" stroke-width="3" fill="none"/>
<text x="10" y="40" fill="orange" font-family="serif">SVG#5 deep nested, mixed units</text>
</svg>
</svg>
<!-- Weird SVG #6: uses vw and vh units with no viewBox -->
<svg width="10vw" height="15vh" x="350" y="250" style="fill:#08f;">
<polygon points="0,0 100,0 50,80" />
<text x="5" y="60" fill="#fff" font-size="12">SVG#6: vw/vh units, no viewBox</text>
</svg>
</svg>
</body>
</html>