outshow many independent weird svgs codes with weird dimensions units and presenting or…
Download ▾
outshow many independent weird svgs codes with weird dimensions units and presenting or missing viewbox properties randomly for testings.
Assistant
Sure! Below are 5 independent weird SVG code snippets. Each snippet varies in:
- Dimension units (
px, %, em, vw, vh, rem, etc.)
- Presence or absence of
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
viewBox
Strange or missing width and height attributesThese are designed for testing how rendering engines handle unusual or inconsistent SVG setups.
SVG 1 - Uses em units for dimensions, with no viewBox
svg
<svg width="10em" height="5em" xmlns="http://www.w3.org/2000/svg" style="border:1px solid black;">
<rect x="0" y="0" width="100%" height="100%" fill="lightblue" />
<circle cx="5em" cy="2.5em" r="2em" fill="coral" />
</svg>
SVG 2 - Missing width and height, has viewBox with fractional numbers
svg
<svg viewBox="0 0 123.45 67.89" xmlns="http://www.w3.org/2000/svg" style="border:1px solid red;">
<ellipse cx="61.725" cy="33.945" rx="50" ry="25" fill="purple" />
</svg>
SVG 3 - Dimensions in viewport width/height units, viewBox missing
svg
<svg width="50vw" height="30vh" xmlns="http://www.w3.org/2000/svg" style="border:1px solid green;">
<line x1="0" y1="0" x2="100%" y2="100%" stroke="black" stroke-width="0.5vw" />
</svg>
SVG 4 - Width in percentage but no height, has viewBox with negative values
svg
<svg width="80%" viewBox="-20 -20 140 140" xmlns="http://www.w3.org/2000/svg" style="border:1px solid blue;">
<rect x="0" y="0" width="100" height="100" fill="orange" />
</svg>
SVG 5 - Both width and height with rem, fractional viewBox, and strange units inside elements
svg
<svg width="15rem" height="7.5rem" viewBox="0 0 150.5 75.25" xmlns="http://www.w3.org/2000/svg" style="border:1px solid purple;">
<rect x="10" y="10" width="50%" height="30%" fill="lightgreen" />
<text x="75.25" y="37.625" font-size="3rem" font-family="Arial" fill="black" text-anchor="middle" dominant-baseline="middle">
Text
</text>
</svg>
You can copy-paste these directly to test rendering behavior in browsers or SVG handling libraries.
If you want more or specific variants, just ask!
Not yet included in a published release.