Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <svg viewBox="0 0 432 216" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <defs>
  <!-- The Scallop Pattern with 3D -->
  <pattern id="pattern-scallop-3d" width="270" height="72" patternUnits="userSpaceOnUse" patternTransform="translate(0 -16)">
   <use width="144" height="72" xlink:href="#scallop-3d" />
   <use width="144" height="72" transform="rotate(180 140 36)" xlink:href="#scallop-3d" />
  </pattern>

  <!-- the scallop pattern -->
  <pattern id="pattern-scallop" width="270" height="72" patternUnits="userSpaceOnUse" patternTransform="translate(0 -16)">
   <use width="144" height="72" xlink:href="#scallop" />
   <use width="144" height="72" transform="rotate(180 140 36)" xlink:href="#scallop" />
  </pattern>

  <!-- the wavy bacon pattern -->
  <pattern id="pattern-bacon" patternUnits="userSpaceOnUse" preserveAspectRatio="none" width="270" height="72" patternTransform="translate(75 20)">
   <use width="144" height="72" transform="translate(-7.8 0)" xlink:href="#wavy-bacon" />
   <use width="144" height="72" transform="matrix(-1 0 0 1 273 0)" xlink:href="#wavy-bacon" />
  </pattern>

  <!-- The final combined pattern -->
  <pattern id="final" patternUnits="userSpaceOnUse" preserveAspectRatio="none" width="270" height="72" patternTransform="scale(.5)">
   <rect width="270" height="72" class="tone1" x="0" />
   <rect width="432" height="216" style="fill:url(#pattern-bacon)" />
   <rect width="432" height="216" style="fill:url(#pattern-scallop)" />
  </pattern>

  <!-- The final combined pattern in 3d -->
  <pattern id="final-3d" patternUnits="userSpaceOnUse" preserveAspectRatio="none" width="270" height="72" patternTransform="scale(.5)">
   <rect width="270" height="72" class="tone1" x="0" />
   <rect width="432" height="216" style="fill:url(#pattern-bacon)" />
   <rect width="432" height="216" style="fill:url(#pattern-scallop-3d)" />

  </pattern>

  <!-- The Base Circles Symbol for everything -->
  <symbol viewBox="0 0 72 72" fill="none" id="circles">
   <g clip-path="url(#clip-path)">
    <circle cx="72" cy="68.5" r="68.5" class="tone1" />
    <circle cx="72" cy="68.5" r="58" class="tone2" />
    <circle cx="72" cy="68.5" r="48" class="tone1" />
    <circle cx="72" cy="68.5" r="37.5" class="tone3" />
    <circle cx="72" cy="68.5" r="28.75" class="tone1" />
    <circle cx="72" cy="68.5" r="18" class="tone2" />
    <circle cx="72" cy="68.5" r="8.3" class="tone1" />
   </g>
  </symbol>

  <symbol id="scallop" viewBox="0 0 144 72">
   <g transform="translate(-113 0)">
    <use width="72" height="72" transform="matrix(-1 0 0 1 258 0)" xlink:href="#circles" />
    <use width="72" height="72" transform="translate(114 0)" xlink:href="#circles" />
   </g>
  </symbol>
  <symbol id="scallop-3d" viewBox="0 0 144 72" style="filter:url(#dropshadow)">
   <g transform="translate(-113 0)" style="filter:url(#innerglow)">
    <use width="72" height="72" transform="matrix(-1 0 0 1 258 0)" xlink:href="#circles" />
    <use width="72" height="72" transform="translate(114 0)" xlink:href="#circles" />
   </g>
  </symbol>

  <symbol id="wavy-bacon" viewBox="0 0 144 72">
   <use width="72" height="72" transform="translate(0 1.3)" xlink:href="#circles" />
   <use width="72" height="72" transform="rotate(180 72 36)" xlink:href="#circles" />
  </symbol>

  <clipPath id="clip-path">
   <path d="M72 0h-.5C45.3 0 22.5 14.7 11 36.4 32.7 38.8 56.5 55.5 64 72h8V0z" fill="#fff" />
  </clipPath>

  <style>
   .tone1 {
    fill: #2F3E46
   }

   .tone2 {
    fill: #354F52
   }

   .tone3 {
    fill: #39555c
   }

   text {
    fill: rgba(255, 255, 255, 0.5);
    font-size: 8px;
    text-anchor: middle
   }
  </style>
  <!-- The Shadow filter -->
  <filter id="dropshadow" height="130%">
   <feGaussianBlur in="SourceAlpha" stdDeviation="3" />
   <feOffset dx="-2" dy="-2" result="offsetblur" />
   <feComponentTransfer>
    <feFuncA type="linear" slope="0.25" />
   </feComponentTransfer>
   <feMerge>
    <feMergeNode />
    <feMergeNode in="SourceGraphic" />
   </feMerge>
  </filter>
  <filter id="innerglow">
   <feFlood flood-color="rgba(0,0,0,0.5" />
   <feComposite in2="SourceAlpha" operator="out" />
   <feGaussianBlur stdDeviation="2" result="blur" />
   <feComposite operator="atop" in2="SourceGraphic" />
  </filter>
 </defs>

 <!-- === THE LAYOUT === -->

 <g class='left-panel'>
  <rect width="140" height="104" style="fill:url(#final)" />
  <rect width="140" y="112" height="104" style="fill:url(#final-3d)" />
  <text class="tone-4" text-anchor="middle">
   <tspan x="70" y="60">Base pattern </tspan>
   <tspan x="70" y="170">Base pattern w/3d </tspan>
  </text>

 </g>

 <g class='middle-panel'>
  <rect width="140" height="216" x="144" style="fill:url(#final)" />
  <rect width="140" height="168" x="144" y="24" class="tone1" style="filter:url(#innerglow)" />
  <text class="tone-4" text-anchor="middle">
   <tspan x="213" y="80">Panel with trim </tspan>
  </text>
 </g>

 <g class='right-panel'>
  <rect width="140" height="216" x="288" class="tone1" />
  <rect width="140" height="216" x="288" style="fill:url(#final);fill-opacity:0.35" />
  <text class="tone-4" text-anchor="middle">
   <tspan x="355" y="80">Faded </tspan>
  </text>
 </g>

</svg>
              
            
!

CSS

              
                body{
 margin: 0;
 font-family: sans-serif;
 padding: 0;
}
.outline{
 outline: 1px red dashed;
}
              
            
!

JS

              
                
              
            
!
999px

Console