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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML

              
                <div class="img">
  <figure>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 58.7 58" aria-labelledby="Title" role="image" focusable="false" aria-hidden="true">
  <title id="Title">Trash can</title>
  <style>
    .st0{stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}
  </style>
  <path d="M31.3 9.9L29.7 6l3 1 3-1-2 4.1M20.5 15.5L17.7 12h3l2.3-2v4M7.6 35.6L4.7 31h3l3.3-2v6M41.7 21h-26l2 36h22zM14 21h30M57.7 51c0 4.5-3.5 6-8 6s-8-1.5-8-6 3.5-10 8-10 8 5.5 8 10z" class="st0"/>
  <path d="M48.8 41.1L47.7 37l2 1 3-1-1.5 4.2M35.7 29l-1 18M21.7 29l1 18M29 29v18M17.7 56.5c-.9.3-1.9.5-3 .5-8 0-11 0-13-5-2.3-5.7 1.1-15.4 7-17 2.6-.7 5.4 0 7.9 1.6M16.9 21.1c.7-2.8 2.4-5.3 4.8-6.1 3.8-1.2 8.2 2.2 10.1 6" class="st0"/>
  <path d="M24.6 14.9c1.9-3 4.9-5.2 8.1-4.9 4.5.5 7.5 6.3 7.5 11M5.7 6.5c1 .5 2 1.5 2 3.5 0 4-4 2-4 6s4 4 4 4M55.8 15c-1 .5-2 1.5-2 3.5 0 4 4 2 4 6s-4 4-4 4M48.8 1c-1 .5-2 1.5-2 3.5 0 4 4 2 4 6s-4 4-4 4" class="st0"/>
</svg>
    <figcaption>Uses <code>currentColor</code></figcaption>
  </figure>
  <figure>
  <svg height="300" width="300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" focusable="false" aria-hidden="true"><path d="M217.77 104.85a20.19 20.19 0 01-11.86-3.33c-4.57-3.21-7.28-8.61-8-16-1.66-16.07 8.52-23.11 14.39-24.69 11-3.95 22.4-3.81 29.85.37a16.22 16.22 0 018.36 11.09c2.71 13.52-6.61 27.37-20.79 30.88a50.26 50.26 0 01-11.95 1.68zM215 70.41c-1.42.4-8.31 2.91-7.16 14 .45 4.43 1.74 7.42 3.84 8.89 2.79 2 7.91 2 15.62.08 10.14-2.51 14.84-11.92 13.38-19.21a6.32 6.32 0 00-3.44-4.33c-5-2.78-13.51-2.63-21.77.38a3.68 3.68 0 01-.47.19zm-1.24-4.84zM295.43 105.06a51.28 51.28 0 01-12-1.74c-14.31-3.54-23.72-17.53-21-31.18a16.28 16.28 0 018.4-11.14c7.53-4.23 19.07-4.37 30.16-.38 5.92 1.6 16.19 8.7 14.51 24.92-.77 7.51-3.5 12.95-8.1 16.19a20.39 20.39 0 01-11.97 3.33zM285 67.67a19.14 19.14 0 00-9.26 2 6.44 6.44 0 00-3.52 4.42c-1.48 7.4 3.29 17 13.58 19.5 7.83 1.94 13 1.91 15.86-.09 2.13-1.5 3.44-4.54 3.91-9 1.17-11.35-5.88-13.88-7.31-14.28a4.75 4.75 0 01-.46-.14 37.94 37.94 0 00-12.8-2.41zM256 265a5 5 0 01-5-5v-86a5 5 0 0110 0v86a5 5 0 01-5 5z"/><path d="M256 197.67c-38.67 0-64.05-11.64-65.11-12.14a5 5 0 014.22-9.06c.34.16 24.66 11.2 60.89 11.2s59.74-10.14 60-10.24a5 5 0 014 9.14c-1 .43-25.38 11.1-64 11.1zM256.05 257.67c-42.18 0-69.85-11.58-71-12.07a5 5 0 013.92-9.2c.33.14 27.13 11.27 67.09 11.27s65.82-10.2 66.08-10.31a5 5 0 013.75 9.27c-1.12.45-27.7 11.04-69.84 11.04zM255.5 227.5c-56.4 0-81.3-16.67-82.33-17.38a5 5 0 015.65-8.25c.32.21 23.86 15.63 76.68 15.63 53.66 0 78.95-12.81 79.2-12.94a5 5 0 014.6 8.88c-1.1.56-27.72 14.06-83.8 14.06zM234.23 335.57a27.76 27.76 0 01-8.77-1.56 44.66 44.66 0 01-10.38-5.15c-3-1.66-27.8-16.27-30.29-38.65-1.2-10.78 3.38-16.94 7.43-20.21 9.07-7.34 24-7.08 34.07-3.73 12 4 25.49 9.61 29.51 11.3 4-1.69 17.49-7.29 29.51-11.3 10-3.35 25-3.61 34.07 3.73 4.05 3.27 8.62 9.43 7.43 20.21-2.49 22.38-27.33 37-30.29 38.65a44.88 44.88 0 01-10.38 5.14c-11.09 3.7-17.77.12-21.43-3.54l-8.77-8.54-9.11 8.6a17.36 17.36 0 01-12.6 5.05zM211.92 274c-5.11 0-10.13 1.1-13.42 3.76-3.1 2.52-4.34 6.22-3.77 11.33 2 18.09 25.16 31 25.39 31.12a5.43 5.43 0 01.51.32c.11.08 13.08 9 19.18 2.86l.11-.1 12.65-11.94a5 5 0 016.92.06l12.25 11.94c6.14 6.14 19.11-2.74 19.24-2.83a5.19 5.19 0 01.5-.31c.23-.13 23.38-13 25.39-31.12.57-5.11-.67-8.81-3.78-11.33-5.81-4.7-17-4.54-24.62-2-13.63 4.54-29.74 11.43-29.9 11.5a11.45 11.45 0 01-5.54 0c-.16-.07-16.29-7-29.9-11.5a36.43 36.43 0 00-11.21-1.76zM135 275a5 5 0 01-4-2c-4.58-6.11-4.57-11.24-3.75-14.47a16.94 16.94 0 017.08-9.56c3.19-26.5 6.29-42.14 7.39-47.26-2.48-5.1-2.87-9.81-1.15-14 2.84-7 10.22-9.26 11.06-9.5a5 5 0 012.79 9.61c-.13 0-3.61 1.19-4.6 3.69-.85 2.13.36 5 1.52 7a5 5 0 01.53 3.62c0 .17-4 17.2-7.9 50.44a5 5 0 01-2.87 4c-.95.46-3.61 2.18-4.16 4.47-.4 1.62.3 3.64 2.06 6a5 5 0 01-4 8zM117 372a5 5 0 01-4.81-3.63c-5-17.39 3.16-27.45 10-31.56 1.45-20.41 7.63-52.35 7.9-53.76a5 5 0 119.82 1.9c-.07.36-6.95 35.89-7.92 55.3a5 5 0 01-3.23 4.43c-1.15.46-11.48 5.11-6.95 20.95A5 5 0 01117 372zM195 420a5 5 0 01-1.08-.12c-.52-.11-12.61-3-13.9-18.46a18.68 18.68 0 019.6-18.52c-3.46-32.25-1.69-56.24-1.61-57.28a5 5 0 0110 .76 342.61 342.61 0 002 59 5 5 0 01-3.65 5.4 8.92 8.92 0 00-6.34 9.76c.69 8.24 6.05 9.53 6.1 9.54A5 5 0 01195 420zM156 174a5.11 5.11 0 01-2.07-.44 5 5 0 01-2.49-6.65c.35-.78 3.68-7.67 13-11.19 10-3.74 22.61-2.16 37.61 4.69a5 5 0 11-4.16 9.1c-29.56-13.52-37.09.95-37.39 1.57A4.94 4.94 0 01156 174zM201 500h-29a5 5 0 010-10h23.29c-3.37-27.3-4.28-61.5-4.29-61.87a5 5 0 014.87-5.13h.13a5 5 0 015 4.87c0 .39 1 39 4.95 66.42A5 5 0 01201 500z"/><path d="M138 357a5 5 0 01-5-5c0-5.14-6.37-7.19-6.44-7.21a5 5 0 012.88-9.58 22.75 22.75 0 016.56 3.41 16.34 16.34 0 017 13.38 5 5 0 01-5 5zM374.65 275a5 5 0 01-4-8c1.77-2.35 2.46-4.37 2.07-6-.56-2.29-3.22-4-4.2-4.49a5.07 5.07 0 01-2.83-3.94c-3.91-33.24-7.86-50.27-7.9-50.44a5 5 0 01.52-3.62c1.17-2.05 2.38-4.93 1.51-7.06s-3.85-3.46-4.54-3.65a5 5 0 012.75-9.62c.83.24 8.22 2.53 11.05 9.5 1.72 4.21 1.33 8.92-1.15 14 1.1 5.12 4.21 20.76 7.4 47.26a17 17 0 017.08 9.56c.81 3.23.82 8.36-3.76 14.47a5 5 0 01-4 2.03zM392.66 372a5 5 0 01-1.38-.19 5 5 0 01-3.43-6.18c4.52-15.84-5.81-20.49-7-21a4.92 4.92 0 01-3.19-4.41c-1-19.41-7.85-54.94-7.91-55.3a5 5 0 119.81-1.9c.28 1.41 6.46 33.35 7.91 53.76 6.83 4.11 15 14.17 10 31.56a5 5 0 01-4.81 3.66zM315.74 419.88l-2.17-9.76h-.1c.57-.15 5.55-1.71 6.2-9.56a9 9 0 00-6.33-9.76 5 5 0 01-3.65-5.4 342.61 342.61 0 002-59 5 5 0 0110-.76c.08 1 1.85 25-1.61 57.28a18.68 18.68 0 019.61 18.52c-1.34 15.46-13.44 18.33-13.95 18.44zM353.66 174a5 5 0 01-4.54-2.88c-.37-.75-8-15-37.39-1.57a5 5 0 01-4.16-9.1c15-6.85 27.66-8.43 37.61-4.69 9.36 3.52 12.68 10.41 13 11.19a5 5 0 01-4.55 7.05zM337.65 500h-29a5 5 0 01-4.95-5.71c3.92-27.39 4.95-66 5-66.42a5 5 0 1110 .26c0 .37-.92 34.57-4.29 61.87h23.29a5 5 0 010 10z"/><path d="M371.65 357a5 5 0 01-5-5 16.34 16.34 0 017-13.38 22.61 22.61 0 016.57-3.41 5 5 0 012.9 9.57c-.32.1-6.47 2.13-6.47 7.22a5 5 0 01-5 5zM259.1 164c-15.89 0-30.4-1.87-34.62-3.22a12.66 12.66 0 01-9.18-12.28 53.86 53.86 0 01.88-11.31c.31-2 .7-4.45 1.13-8a6.44 6.44 0 000-1.48 9.08 9.08 0 00-3.31.55l-.35.12c-12.29 3.62-20.18-5.28-22.65-10.66-5.15-9.64-8.1-22.65-8.1-35.71 0-20 6.4-37.95 18-50.7 12.71-13.94 31-21.31 53-21.31h6c22 0 40.28 7.37 53 21.31 11.62 12.75 18 30.75 18 50.7 0 13.18-2.95 26.25-8.09 35.9-2.53 5.34-10.42 14.21-22.74 10.51l-.32-.11a10.08 10.08 0 00-3.4-.56 6.44 6.44 0 00.08 1.33c.23 1.59.52 3.18.79 4.72.84 4.64 1.7 9.44 1.24 15 0 7.9-5.61 11.37-8.6 12.1-9.23 2.27-20.29 3.1-30.76 3.1zm-33.8-15.2c0 .82.45 1.89 2.22 2.46 5.44 1.73 38.77 5.2 59.71-.05.54-.22 1.15-.84 1.13-2.55a3.25 3.25 0 010-.54c.39-4.28-.3-8.1-1.1-12.53-.29-1.62-.59-3.29-.85-5-.85-5.86 1.33-9 3.31-10.59 4.66-3.75 11.47-1.68 13.23-1.05 7.23 2.08 10.58-5 10.72-5.31 0-.09.09-.18.14-.27 4.37-8.13 7-19.83 7-31.29 0-17.45-5.47-33.06-15.4-44-10.76-11.81-26.53-18-45.6-18h-6c-19.07 0-34.84 6.24-45.6 18-9.93 10.9-15.4 26.51-15.4 44 0 11.35 2.61 23 7 31.11l.14.29c.58 1.22 3.89 7.34 10.7 5.39 1.76-.64 8.36-2.67 13 1 2 1.57 4.26 4.69 3.54 10.58-.46 3.73-.86 6.29-1.18 8.35a44.85 44.85 0 00-.76 9.72 2 2 0 01.05.26zm62.05 2.37h-.1.09zm-62.06-2.31zm-8-21.48z"/><path d="M256.24 163.68a5 5 0 01-5-5v-14.29a5 5 0 0110 0v14.29a5 5 0 01-5 5zM237.51 162.87a5 5 0 01-5-5 65.06 65.06 0 011.74-16.62 5 5 0 019.63 2.69 56.46 56.46 0 00-1.37 13.83 5 5 0 01-4.95 5.05zM275.63 162.87h-.05a5 5 0 01-4.95-5.05 56.46 56.46 0 00-1.37-13.82 5 5 0 019.63-2.69 64.52 64.52 0 011.74 16.62 5 5 0 01-5 4.94zM145 117H17a5 5 0 01-5-5V16a5 5 0 015-5h128a5 5 0 015 5v96a5 5 0 01-5 5zM22 107h118V21H22zM496 501H368a5 5 0 01-5-5v-96a5 5 0 015-5h128a5 5 0 015 5v96a5 5 0 01-5 5zm-123-10h118v-86H373z"/><path d="M126 195a5 5 0 01-3.54-1.46l-46-46A5 5 0 0175 144v-32a5 5 0 0110 0v29.93l44.54 44.53A5 5 0 01126 195zM368 405a5 5 0 01-3.54-1.46l-29-29a5 5 0 017.08-7.08l29 29A5 5 0 01368 405zM117 52H43a5 5 0 010-10h74a5 5 0 010 10zM117 85H43a5 5 0 010-10h74a5 5 0 010 10zM468 436h-74a5 5 0 010-10h74a5 5 0 010 10zM468 469h-74a5 5 0 010-10h74a5 5 0 010 10z"/></svg>
    <figcaption>No colors defined, uses <code>GrayText</code> in FQs</figcaption>
  </figure>
  <figure>
  <svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 64 64" focusable="false" aria-hidden="true"><path d="M32 10a22 22 0 1022 22 22 22 0 00-22-22zm17.3 16l1.6-.6a19.8 19.8 0 011 5.6H50v2h2a19.8 19.8 0 01-1.1 5.6l-1.6-.5-.6 1.9 1.4.4a20 20 0 01-3.3 5l-1-1.1-1.5 1.4 1.1 1.1a20 20 0 01-4.8 3.2l-.7-1.4-1.8.8.7 1.4a19.8 19.8 0 01-2.5.7A5 5 0 0037 49v-5h1v-2H26v2h1v5a5 5 0 00.7 2.5 19.8 19.8 0 01-2.5-.7l.7-1.4-1.8-.8-.7 1.4a20 20 0 01-4.8-3.2l1.1-1-1.4-1.5-1.1 1.1a20 20 0 01-3.3-5l1.4-.5-.6-1.9-1.6.6a19.8 19.8 0 01-1-5.6H14v-2h-2a19.8 19.8 0 011.1-5.6l1.6.5.6-1.9-1.4-.4a20 20 0 013.3-5l1 1.1 1.5-1.4-1-1.1a20 20 0 014.7-3.2l.7 1.4 1.8-.9-.7-1.3a19.8 19.8 0 015.8-1.1V14h2v-2a19.8 19.8 0 015.8 1.2l-.7 1.4 1.8.8.7-1.4a20 20 0 014.8 3.2l-1.1 1 1.4 1.5 1.1-1a20 20 0 013.3 4.9l-1.4.5zM29 49v-5h2v4h2v-4h2v5a3 3 0 01-6 0z"></path><path d="M54.7 2.3a1 1 0 00-1.4 0l-4 4a1 1 0 000 1.4L50.6 9 48 11.6a26 26 0 00-32 0L13.4 9l1.3-1.3a1 1 0 000-1.4l-4-4a1 1 0 00-1.4 0l-7 7a1 1 0 000 1.4l4 4a1 1 0 001.4 0L9 13.4l2.6 2.6A26 26 0 0016 52.5L12.6 56H11a1 1 0 00-1 1v4a1 1 0 001 1h8a1 1 0 001-1v-3.6l1.6-1.6a26 26 0 0020.8 0l1.6 1.6V61a1 1 0 001 1h8a1 1 0 001-1v-4a1 1 0 00-1-1h-1.6L48 52.5A26 26 0 0052.4 16l2.6-2.6 1.3 1.3a1 1 0 001.4 0l4-4a1 1 0 000-1.4zM7 12.6L4.4 10 10 4.4 12.6 7zm3.4-.6l1.6-1.6 2.4 2.4-1.5 1.6zM18 60h-6v-2h6zm.6-4h-3.2l2.3-2.3 2 1.2zM52 60h-6v-2h6zm-3.4-4h-3.2l-1-1.1a26 26 0 001.9-1.2zM32 56a24 24 0 1124-24 24 24 0 01-24 24zm19.1-41.6L49.6 13l2.4-2.5 1.6 1.6zm5.9-1.8L51.4 7 54 4.4l5.6 5.6z"></path><path d="M35 32a3 3 0 00-6 0 3 3 0 00.3 1.3l-7.5 7.5 1.4 1.4 7.5-7.5a2.9 2.9 0 002.6 0l7 7 1.4-1.4-7-7A3 3 0 0035 32zm-4 0a1 1 0 111 1 1 1 0 01-1-1zM26.3 27.7l1.4-1.4-2.3-2.3 2.3-2.3-1.4-1.4-2.3 2.3-2.3-2.3-1.4 1.4 2.3 2.3-2.3 2.3 1.4 1.4 2.3-2.3 2.3 2.3zM42.3 20.3L40 22.6l-2.3-2.3-1.4 1.4 2.3 2.3-2.3 2.3 1.4 1.4 2.3-2.3 2.3 2.3 1.4-1.4-2.3-2.3 2.3-2.3-1.4-1.4zM47 28h2v2h-2zM44 31h2v2h-2z"></path></svg>
    <figcaption>No colors defined</figcaption>
  </figure>
  <figure>
  <svg xmlns="http://www.w3.org/2000/svg" id="Chromiedge" viewBox="0 0 224.8 224.2" focusable="false" aria-hidden="true">
  <style>
    .CE0{fill:#BBD4EB;} .CE1{fill:#699DD3;} .CE2{fill:#CADEF0;} .CE3{fill:#2E5C91;} .CE4{fill:#527FAB;} .CE5{fill:#89B7E1;} .CE6{fill:#6899CE;}
  </style>
  <path id="TopRight" d="M213.6 63.1C203.5 61 177 42.7 157.1 42.7c-19.8 0-36.8 7.4-43.8 17.8 24.4.6 44.5 18.5 48.7 41.9 2.6.3 5.2.4 7.8.4 26.1 0 45.8-19.3 45.8-34.9-.7-1.9-1.3-3.1-2-4.8z" class="CE0"/>
  <path id="Bottom" d="M100.4 168c-14.2 20.5-11.9 46.6.2 55.8 1.2.2 1.9.2 3.2.2 7.7-6.8 31.2-7.8 43.2-23.7 6.9-9.1 11.7-19.9 13.9-30-19.3 4.8-41.3 6-60.5-2.3z" class="CE1"/>
  <path id="Right2" d="M204.3 152.6c-12.8 8.3-42.7 21.5-72.6 21.4-14.2 25.1-25.6 46.1-27.9 50 58.7 2.7 87.5-27.3 100.4-46.6v-24.8z" class="CE2"/>
  <path id="Right1" d="M161.8 122.1h62.5c1.3-15.3-.3-33.9-8.7-54.1-5.1.9-50.7 11.2-61.9 14.4a50.97 50.97 0 0 1 8.1 39.7z" class="CE2"/>
  <path id="TopLeft2" d="M64.7 92.6c-7.7 7.2-14.8 14.9-20.5 23.7 6.6 5.6 13.3 9.8 19.5 11.6-1.7-5.1-2.6-10.5-2.6-16.2-.1-6.8 1.2-13.2 3.6-19.1z" class="CE3"/>
  <path id="TopLeft1" d="M26.3 96.1a151.9 151.9 0 0 1 49.5-27.9c-.7-1-1.4-2.1-2.2-3.1-16-20.6-38.9-28.9-51.3-19.3-.8 1.3-1.5 2.6-2.2 3.7 4.3 8.5-2.3 30.9 6.2 46.6z" class="CE3"/>
  <path id="Top" d="M105.2.3c-8.4 0-51.5 3.9-82.9 45.6 2.4 2.7 18.2 19.6 30.4 32.4 13.5-7.2 29.4-13.1 48-16.5 3.6-.8 7.4-1.3 11.3-1.3 5.7 0 11.3 1 16.4 2.7 40.1.1 79.3-.2 85.2-.1C175.9-8.3 113.6.3 105.2.3z" class="CE4"/>
  <path id="Left2" d="M65.8 133.3c-1.7-3.7-2.9-7.5-3.8-11.5l-9.5-16.6c-16.8 19.7-27.2 44.3-21.7 83.6 12.4 13.2 35 30.7 69.9 35 1.4-4 10.4-33.7 15.3-51.2-19.8-3.6-38.4-14.8-50.2-39.3z" class="CE5"/>
  <path id="Left1" d="M40.9 85.2C30.2 66.7 22 52.6 20.2 49.5 1.5 79.2-1.8 105.3.8 126c6.3-11.4 19.6-27.3 40.1-40.8z" class="CE5"/>
  <path id="Circle" d="M73.9 97.5a40.89 40.89 0 0 0 38.3 55.2 40.89 40.89 0 0 0 38.3-55.2H73.9z" class="CE6"/>
</svg>      
    <figcaption>Uses its own colors throughout</figcaption>
  </figure>
  
</div>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
}

.img {
  display: flex;
  flex-wrap: wrap;
}

.img > * {
  width: 20vw;
  height: auto;
  flex: 1 1 20vw;
}

.img figure svg {
  max-width: 20vw;
  height: auto;
}

.img figure:first-child svg {
  fill: none;
  stroke: currentColor;
}

@media screen and (-ms-high-contrast: active),
  screen and (forced-colors: active) {
    .img figure:nth-child(2) svg {
      fill: GrayText;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console