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.

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

              
                <!-- Start SVG Defs for xlinking our icons -->

<div class="svg-defs">
  <svg xmlns="http://www.w3.org/2000/svg">
  	<symbol viewBox="0 0 18 18" id="icon-task-fill">
  		<title>icon-task-fill</title>
  		<path d="M13 1V0H5v1H0v17h18V1zM6 1h6v3H6zm11 3h-2v1h2v12H1V5h2V4H1V2h4v3h8V2h4z"/>
  		<path fill="currentColor" d="M8 12.71l-2.35-2.36.7-.7L8 11.29l3.65-3.64.7.7L8 12.71z"/>
  	</symbol>
  	<symbol viewBox="0 0 18 18" id="icon-task-stroke">
  		<title>icon-task-stroke</title>
  		<path class="non-scaling-stroke" stroke-miterlimit="10" d="M5.5 1.5h-5v16h17v-16h-5"/>
  		<path class="non-scaling-stroke" stroke-miterlimit="10" d="M5.5.5h7v4h-7zM3 4.5H.5M17.5 4.5H15"/>
  		<path class="non-scaling-stroke" stroke="currentColor" stroke-miterlimit="10" d="M6 10l2 2 4-4"/>
  	</symbol>
  </svg>
</div>

<!-- End SVG Defs -->

<div class="icons">
  <div class="task-icon">
    <p>Fill Icons</p>
    <div class="task-icon fill one">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-fill" />
      </svg>
      <span class="visuallyhidden">10 px Filled Task Icon</span>
    </div>
    <div class="task-icon fill two">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-fill" />
      </svg>
      <span class="visuallyhidden">20 px Filled Task Icon</span>
    </div> 
    <div class="task-icon fill three">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-fill" />
      </svg>
      <span class="visuallyhidden">40 px Filled Task Icon</span>
    </div>
    <div class="task-icon fill four">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-fill" />
      </svg>
      <span class="visuallyhidden">80 px Filled Task Icon</span>
    </div>
  </div>
  <div class="task-icon">
    <p>Stroke Icons (with non-scaling-stroke)</p>
    <div class="task-icon stroke one">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-stroke" />
      </svg>
      <span class="visuallyhidden">10 px Stroked Task Icon</span>
    </div>
    <div class="task-icon stroke two">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-stroke" />
      </svg>
      <span class="visuallyhidden">20 px Stroked Task Icon</span>
    </div>
    <div class="task-icon stroke three">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-stroke" />
      </svg>
      <span class="visuallyhidden">40 px Stroked Task Icon</span>
    </div>
    <div class="task-icon stroke four">
      <svg class="icon icon-task" aria-hidden="true" focusable=”false”>
        <use xlink:href="#icon-task-stroke" />
      </svg>
      <span class="visuallyhidden">80 px Stroked Task Icon</span>
    </div>
  </div>
</div>
              
            
!

CSS

              
                .svg-defs {
  display: none;
}

p {
  font-family: Helvetica, Arial, Sans-Serif;
  font-weight: 100;
  text-align: center;
}

/* Start the magic css for locking down svg stroke width */

.non-scaling-stroke {
  vector-effect: non-scaling-stroke;
}

/* End magic */

.icons {
  margin: 0 auto;
  position: relative;
  width: 800px;

  .task-icon {
    float: left;
    margin: 20px;
    
    .visuallyhidden {
      border: 0;
      clip: rect(0 0 0 0);
      height: 1px;
      margin: -1px;
      overflow: hidden;
      padding: 0;
      position: absolute;
      width: 1px;
      white-space: nowrap;
    }

    /* Start some more magic css for two color svg icons */

    .icon-task {
      color: #ff8400;
    }

    /* End some more magic */

    &.one .icon {
      height: 10px;
      width: 10px;
    }

    &.two .icon {
      height: 20px;
      width: 20px;
    }

    &.three .icon {
      height: 40px;
      width: 40px;
    }

    &.four .icon {
      height: 80px;
      width: 80px;
    }

    .fill {

      .icon {
        fill: #9d9d9d;
        stroke: none;
      }
    }
    .stroke {

      .icon {
        fill: none;
        stroke: #9d9d9d;
      }
    }
  } 
}
              
            
!

JS

              
                
              
            
!
999px

Console