<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Weird Nested SVGs Example</title>
<style>
body {
background: #222;
color: #ddd;
font-family: monospace, monospace;
}
svg {
margin: 1em;
border: 1px solid #555;
background: #111;
}
</style>
</head>
<body>
<h1>Weird Nested SVGs with Random Dimensions & Missing ViewBox</h1>
<!-- Outer SVG with weird units and nested SVG inside -->
<svg width="15em" height="10vh" xmlns="http://www.w3.org/2000/svg" style="background:#303030;">
<rect x="1em" y="1em" width="3em" height="7em" fill="#f06" opacity="0.7" />
<!-- Nested SVG with percentages and missing viewBox -->
<svg x="5em" y="1em" width="40%" height="80%">
<circle cx="50%" cy="50%" r="40%" fill="cyan" />
<rect x="10%" y="10%" width="30%" height="30%" fill="yellow" opacity="0.5"/>
<!-- deeply nested SVG with px units and viewBox -->
<svg x="1em" y="3em" width="50px" height="50px" viewBox="0 0 100 100">
<polygon points="10,10 90,50 10,90" fill="lime" />
</svg>
</svg>
<!-- Another nested SVG with mixed units and missing viewBox -->
<svg x="12em" y="2em" width="6vw" height="6vw" >
<ellipse cx="50%" cy="50%" rx="40%" ry="25%" fill="orange" />
<line x1="0" y1="0" x2="100%" y2="100%" stroke="white" stroke-width="0.2em" />
</svg>
</svg>
<!-- Independent weird SVG with units in cm and no viewBox -->
<svg width="5cm" height="3cm" style="background:#040404; margin:2em;">
<circle cx="2.5cm" cy="1.5cm" r="1.2cm" fill="magenta" opacity="0.6" />
<rect x="1cm" y="0.5cm" width="3cm" height="2cm" fill="yellow" stroke="black" stroke-width="0.1cm" />
<!-- Nested SVG inside with missing viewBox -->
<svg x="0.5cm" y="0.5cm" width="4cm" height="2cm" >
<path d="M0,0 L4cm,0 L2cm,2cm Z" fill="lime" />
</svg>
</svg>
<!-- Another independent SVG with viewBox but weird percentages -->
<svg width="50vw" height="25vh" viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg" style="background:#222;">
<rect x="10%" y="10%" width="80%" height="80%" fill="navy" opacity="0.7" />
<!-- Nested SVG missing viewBox -->
<svg x="20%" y="20%" width="60%" height="60%">
<circle cx="50%" cy="50%" r="30%" fill="red" />
<!-- Deeper nested with px and viewBox -->
<svg x="10" y="10" width="80" height="80" viewBox="0 0 80 80">
<line x1="0" y1="80" x2="80" y2="0" stroke="white" stroke-width="5" />
</svg>
</svg>
</svg>
</body>
</html>
This HTML document contains multiple independent and nested SVG elements with various weird dimension units (em, vh, vw, cm, %, px) and some SVGs intentionally missing viewBox properties randomly. The nested SVGs also vary in position and size using different units. The page background is dark so colored shapes stand out.