Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-mini-2025-04-14· OpenAIAi2 WildChat-4.8M (AI2)

outshow many independent weird svgs codes with weird dimensions units and presenting or…

  1. User

    outshow many independent weird svgs codes with weird dimensions units and presenting or missing viewbox properties randomly for testings.

  2. Assistant

    Certainly! Here are 5 independent SVG code snippets with various weird dimension units, and presenting or missing viewBox properties randomly. These can be used to test how different SVG viewers or parsers handle unusual dimensions and the presence or absence of the viewBox.


    SVG 1: Dimensions in em, with viewBox

    <svg width="10em" height="5em" viewBox="0 0 100 50" xmlns="http://www.w3.org/2000/svg">
      <rect x="10" y="10" width="80" height="30" fill="coral"/>
    </svg>
    

    SVG 2: Dimensions in %, no viewBox

    <svg width="50%" height="50%" xmlns="http://www.w3.org/2000/svg">
      <circle cx="50" cy="50" r="40" fill="lime" />
    </svg>
    

    SVG 3: Dimensions in vw and vh, with viewBox

    <svg width="20vw" height="10vh" viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
      <ellipse cx="100" cy="50" rx="80" ry="40" fill="purple" />
    </svg>
    

    SVG 4: Dimensions in pt, no viewBox

    <svg width="150pt" height="75pt" xmlns="http://www.w3.org/2000/svg">
      <line x1="10" y1="10" x2="140" y2="65" stroke="blue" stroke-width="3"/>
    </svg>
    

    SVG 5: Dimensions in in (inches), with viewBox

    <svg width="2in" height="1in" viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
      <polygon points="10,90 190,90 100,10" fill="orange" />
    </svg>
    

    Summary

    SVG #Width UnitHeight UnitHas ViewBox?
    1ememYes
    2%%No
    3vwvhYes
    4ptptNo
    5ininYes

    Use these snippets independently in your HTML or SVG viewers to test how well they handle various dimension units and the presence or absence of viewBox. If you want more or different weird units (e.g., cm, mm, pc, ex, ch), just let me know!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.