Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <h1>Simple SVG-Icons, provided by <a href="https://twitter.com/heydonworks">Heydon Pickering</a></h1>
<h2>Minus</h2>
<svg class="icon" viewBox="0 0 10 10">
  <rect height="2" width="8" y="4" x="1"/>
</svg>

<h2>Star</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m7.4 8.8-2.4-1.3-2.4 1.3.46-2.7-2-1.9 2.7-.39 1.2-2.5 1.2 2.5 2.7.39-1.9 1.9z"/>
</svg>

<h2>tick (check)</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m7.5125 1.123 1.7321 1-4 6.9282-4.3301-2.5 1-1.7321 2.5981 1.5z"/>
</svg>

<h2>cross (close)</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m7.1 1.4 1.4 1.4-5.6 5.6-1.4-1.4zm-4.2 0l5.6 5.6-1.4 1.4-5.6-5.6z"/>
</svg>

<h2>plus sign</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m1 4h8v2h-8zm3-3h2v8h-2z"/>
</svg>

<h2>menu/hamburger icon</h2>
<svg class="icon" viewBox="0 0 10 10">
 <path d="m1 7h8v2h-8zm0-3h8v2h-8zm0-3h8v2h-8z"/>
</svg>

<h2>left arrow</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m9 4h-4v-2l-4 3 4 3v-2h4z"/>
</svg>

<h2>right arrow</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m1 4h4v-2l4 3-4 3v-2h-4z"/>
</svg>

<p>Or implement it as the left arrow with a CSS-transformation. Suggested by <a href="https://twitter.com/g16n/status/922467334287187968"> Gunnar Bittersmann</a>.</p>

<svg class="icon" viewBox="0 0 10 10">
  <path d="m9 4h-4v-2l-4 3 4 3v-2h4z" transform-origin="center" transform="rotate(180)" />
</svg>

<h2>up arrow</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m5 1-3 4h2v4h2v-4h2z"/>
</svg>

<h2>down arrow</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m5 9-3-4h2v-4h2v4h2z"/>
</svg>

<p>Or implement it as the up-arrow with a CSS-transformation:</p>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m5 9-3-4h2v-4h2v4h2z" transform-origin="center" transform="rotate(360)" />
</svg>

<h2>Star (by <a href="https://twitter.com/nice2meatu/status/928282440044548097">Marco Hengstenberg</a>)</h2>
<svg class="icon" viewbox="0 0 600 600">
  <polygon fill="#93111e" stroke="black" stroke-width="10" points="350,75 379,161 469,161 397,215 423,301 350,250 277,301 303,215 231,161 321,161" />
</svg>

<h2>Upwards trend (by <a href="https://twitter.com/nice2meatu/status/928284910208643074">Marco Hengstenberg</a>)</h2>

<svg class="icon" role="img" viewBox="0 0 24 24"><path role="presentation" d="M16.8 0l2.748 2.748-5.856 5.856-4.8-4.8L0 12.708 1.692 14.4l7.2-7.2 4.8 4.8 7.56-7.548L24 7.2V0"/></svg>

<h2>Thumbs up</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m2.8 1c-.7 0-.8.3-.7 1 .5 2.3-1 5.9.6 6.9h.4 4c.8 0 .8-1 .3-1.2.7-.4.4-1 .1-1.2.7-.3.5-1.1.1-1.3.3-.1.5-.3.5-.6 0-.4-.3-.7-.6-.7h-3.5c.1-2-.6-2.8-1.2-2.9z"/>
</svg>

<h2>Thumbs down</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m2.8 8.9c-.7 0-.8-.3-.7-1 .5-2.3-.9-6.5.6-6.9h.4 4c.8 0 .8 1 .3 1.2.7.4.4 1 .1 1.2.7.3.5 1.1.1 1.3.3.1.5.3.5.6 0 .4-.3.7-.6.7h-3.5c.1 2-.6 2.8-1.2 2.9z"/>
</svg>

<h2>Warning sign</h2>
<svg class="icon" viewBox="0 0 10 10">
  <path d="m5 1-4 8h8zm-.36 2.6h.7v3h-.7v-2.8594zm.36 3.4c.4 0 .5.3.5.6-.1.3-.4.45-.63.4-.27-.1-.47-.4-.37-.63.07-.17.20-.37.50-.37z"/>
</svg>

<h2>Eye</h2>
<p>This icon is the first in this gallery, which has a specific class.</p>
<svg class="icon icon-eye" viewBox="0 0 32 32" stroke-linecap="round">
  <path d="M4,16 C9,28 23,28 28,16" stroke-width="3" />
  <path d="M4,16 C9,4 23,4 28,16" stroke-width="3" />
  <circle cx="16" cy="16" r="4.5" stroke-width="5" />
</svg>

<h2>Home</h2>
<p>copied from somewhere else :-) This icon has a different viewbox!</p>
<svg class="icon icon-home" viewBox="0 0 512 512">
  <path d="M512 295.222l-256-198.713-256 198.714v-81.019l256-198.713 256 198.714zM448 288v192h-128v-128h-128v128h-128v-192l192-144z"></path>
</svg>
            
          
!

CSS

            
              .icon {
  width: 2.5rem;
  height: auto;
}

.icon-eye {
  stroke: currentColor;
  fill: none;
  text-decoration-skip: objects;
}

            
          
!

JS

            
              
            
          
!
999px

Console