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

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

              
                  <ul class="filters">
    <li>
      <label>
        <input type="checkbox" checked>
        <span class="icon"><i class="fa fa-check"></i></span>
        foo
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox" checked>
        <span class="icon"><i class="fa fa-times"></i></span>
        bar
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox">
        <span class="icon"><i class="fa fa-check"></i></span>
        baz
      </label>
    </li>
  </ul>

              
            
!

CSS

              
                /* Core */

.filters input {
  display: none;
}

.filters .icon {
  text-align: center;
  display: inline-block;
}

.filters .icon .fa {
  visibility: hidden;
}

.filters input:checked + .icon .fa {
  visibility: visible;
}


/* IE8 and lower disabling hack because it does not support the :checked selector */

.filters input {
  display: inline\9;
}

.filters .icon {
  display: none\9;
}


/* Optional */

.filters {
  /* prevent accidental selection when clicking */
  user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.filters label {
  cursor: pointer;
}


/* Checkbox styling */

.filters input {
    margin: 0 .1em; /* Use something similar to .icon */
}

.filters .icon {
    background: #fcf4d2;
    border: 1px solid;
    border-color: #cac3a8 #f9f0c2 #f9f0c2 #cac3a8;
    border-radius: .3em;
    text-align: center;
    font-size: .8em;
    color: #666;
    margin: 0 .1em;
    height: 1em;
    width: 1em;
    padding: 0.15em;
    line-height: 1.1em;
    /**
     * Values for height, width and line-height
     * may need to be adjusted depending on your font.
     */
}


/* Inline menu styling */

.filters {
  list-style: none;
  padding: 8px;
  display: inline-block;
}

.filters li {
  display: inline-block;
  margin-right: 0.3em;
}


/* Extra beautify */

body {
  background: #fcf4d2;
  font-size: 20px;
  font-family: Verdana, sans-serif;
  text-align: center;
}

.filters {
  border-radius: 4px;
  box-shadow: 0 0 7px rgba(0,0,0,0.15);
  background: #fff;
}

              
            
!

JS

              
                
              
            
!
999px

Console